/********************************************/
/*                                          */
/*        Copyright (c) 2017 Aostar         */
/*        @author bgu, pgao, zyang          */
/*                                          */
/********************************************/

var AostarJS = AostarJS || (function (Math, undefined) {
    var C = {};
    var fK = C.js = {};
    var Base = fK.Base = (function () {
        function F() {
        };
        return {
            extend: function (hJ) {
                F.prototype = this;
                var ha = new F();
                if (hJ) {
                    ha.nh(hJ);
                }
                if (!ha.hasOwnProperty('eZ')) {
                    ha.eZ = function () {
                        ha.uw.eZ.apply(this, arguments);
                    };
                }
                ha.eZ.prototype = ha;
                ha.uw = this;
                return ha;
            }, create: function () {
                var pp = this.extend();
                pp.eZ.apply(pp, arguments);
                return pp;
            }, eZ: function () {
            }, nh: function (iH) {
                for (var propertyName in iH) {
                    if (iH.hasOwnProperty(propertyName)) {
                        this[propertyName] = iH[propertyName];
                    }
                }
                if (iH.hasOwnProperty('toString')) {
                    this.toString = iH.toString;
                }
            }, clone: function () {
                return this.eZ.prototype.extend(this);
            }
        };
    }());
    var fE = fK.fE = Base.extend({
        eZ: function (da, fg) {
            da = this.da = da || [];
            if (fg != undefined) {
                this.fg = fg;
            } else {
                this.fg = da.length * 4;
            }
        }, toString: function (sU) {
            return (sU || jo).stringify(this);
        }, concat: function (fB) {
            var kT = this.da;
            var la = fB.da;
            var jJ = this.fg;
            var ot = fB.fg;
            this.fz();
            if (jJ % 4) {
                for (var i = 0; i < ot; i++) {
                    var sA = (la[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
                    kT[(jJ + i) >>> 2] |= sA << (24 - ((jJ + i) % 4) * 8);
                }
            } else if (la.length > 0xffff) {
                for (var i = 0; i < ot; i += 4) {
                    kT[(jJ + i) >>> 2] = la[i >>> 2];
                }
            } else {
                kT.push.apply(kT, la);
            }
            this.fg += ot;
            return this;
        }, fz: function () {
            var da = this.da;
            var fg = this.fg;
            da[fg >>> 2] &= 0xffffffff << (32 - (fg % 4) * 8);
            da.length = Math.ceil(fg / 4);
        }, clone: function () {
            var clone = Base.clone.call(this);
            clone.da = this.da.slice(0);
            return clone;
        }, random: function (oD) {
            var da = [];
            for (var i = 0; i < oD; i += 4) {
                da.push((AostarJS.el.gy.jz() * 0x100000000) | 0);
            }
            return new fE.eZ(da, oD);
        }
    });
    var iZ = C.el = {};
    var gy = iZ.gy = {
        jz: function () {
            var n = 0xefc8249d;
            var data = new Date().getTime().toString();
            for (var i = 0; i < data.length; i++) {
                n += data.charCodeAt(i);
                var h = 0.02519603282416938 * n;
                n = h >>> 0;
                h -= n;
                h *= n;
                n = h >>> 0;
                h -= n;
                n += h * 0x100000000;
            }
            while (true) {
                var uh = new Date().getTime().toString();
                if (uh != data) {
                    return (n >>> 0) * 2.3283064365386963e-10;
                }
            }
        }
    };
    var jo = iZ.jo = {
        stringify: function (fB) {
            var da = fB.da;
            var fg = fB.fg;
            var mG = [];
            for (var i = 0; i < fg; i++) {
                var kH = (da[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
                mG.push((kH >>> 4).toString(16));
                mG.push((kH & 0x0f).toString(16));
            }
            return mG.join('');
        }, parse: function (fd) {
            var fZ = fd.length;
            var da = [];
            for (var i = 0; i < fZ; i += 2) {
                da[i >>> 3] |= parseInt(fd.substr(i, 2), 16) << (24 - (i % 8) * 4);
            }
            return new fE.eZ(da, fZ / 2);
        }
    };
    var mC = iZ.mC = {
        stringify: function (fB) {
            var da = fB.da;
            var fg = fB.fg;
            var qw = [];
            for (var i = 0; i < fg; i++) {
                var kH = (da[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
                qw.push(String.fromCharCode(kH));
            }
            return qw.join('');
        }, parse: function (pB) {
            var qC = pB.length;
            var da = [];
            for (var i = 0; i < qC; i++) {
                da[i >>> 2] |= (pB.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);
            }
            return new fE.eZ(da, qC);
        }
    };
    var fM = iZ.fM = {
        stringify: function (fB) {
            try {
                return decodeURIComponent(escape(mC.stringify(fB)));
            } catch (e) {
                throw new Error('Malformed UTF-8 data');
            }
        }, parse: function (sz) {
            return mC.parse(unescape(encodeURIComponent(sz)));
        }
    };
    var jj = fK.jj = Base.extend({
        reset: function () {
            this.gx = new fE.eZ();
            this.pN = 0;
        }, jM: function (data) {
            if (typeof data == 'string') {
                data = fM.parse(data);
            }
            this.gx.concat(data);
            this.pN += data.fg;
        }, ig: function (rD) {
            var data = this.gx;
            var jg = data.da;
            var qE = data.fg;
            var eG = this.eG;
            var jY = eG * 4;
            var jh = qE / jY;
            if (rD) {
                jh = Math.ceil(jh);
            } else {
                jh = Math.max((jh | 0) - this.pR, 0);
            }
            var jG = jh * eG;
            var pe = Math.min(jG * 4, qE);
            if (jG) {
                for (var offset = 0; offset < jG; offset += eG) {
                    this.qX(jg, offset);
                }
                var uH = jg.splice(0, jG);
                data.fg -= pe;
            }
            return new fE.eZ(uH, pe);
        }, clone: function () {
            var clone = Base.clone.call(this);
            clone.gx = this.gx.clone();
            return clone;
        }, pR: 0
    });
    var gp = fK.gp = jj.extend({
        cf: Base.extend(), eZ: function (cf) {
            this.cf = this.cf.extend(cf);
            this.reset();
        }, reset: function () {
            jj.reset.call(this);
            this.qg();
        }, update: function (ic) {
            this.jM(ic);
            this.ig();
            this.gx = fM.parse(ic);
            return this;
        }, gS: function (ic) {
            if (ic) {
                this.jM(ic);
            }
            var hash = this.mE();
            return hash;
        }, eG: 512 / 32, qa: function (mc) {
            return function (message, cf) {
                return new mc.eZ(cf).gS(message);
            };
        }, tU: function (mc) {
            return function (message, key) {
                return new lv.qf.eZ(mc, key).gS(message);
            };
        }
    });
    var lv = C.hk = {};
    return C;
}(Math));
if (typeof QMX == "undefined" || !QMX) {
    var QMX = {};
}
QMX.namespace = function () {
    var a = arguments, o = null, i, j, d;
    for (i = 0; i < a.length; i = i + 1) {
        d = ("" + a[i]).split(".");
        o = QMX;
        for (j = (d[0] == "QMX") ? 1 : 0; j < d.length; j = j + 1) {
            o[d[j]] = o[d[j]] || {};
            o = o[d[j]];
        }
    }
    return o;
};
QMX.log = function (uI, rH, src) {
    var l = QMX.widget.vA;
    if (l && l.log) {
        return l.log(uI, rH, src);
    } else {
        return false;
    }
};
QMX.uj = function (name, it, data) {
    var np = QMX.ge.pu, m, v, b, ls, i;
    if (!np[name]) {
        np[name] = {sy: [], sl: []};
    }
    m = np[name];
    v = data.version;
    b = data.qR;
    ls = QMX.ge.qe;
    m.name = name;
    m.version = v;
    m.qR = b;
    m.sy.push(v);
    m.sl.push(b);
    m.it = it;
    for (i = 0; i < ls.length; i = i + 1) {
        ls[i](m);
    }
    if (it) {
        it.VERSION = v;
        it.vH = b;
    } else {
        QMX.log("it is undefined for ve " + name, "warn");
    }
};
QMX.ge = QMX.ge || {pu: [], qe: []};
QMX.ge.vN = function (name) {
    return QMX.ge.pu[name] || null;
};
QMX.ge.tG = function (uG) {
    var hu = function (s) {
        var c = 0;
        return parseFloat(s.replace(/\./g, function () {
            return (c++ == 1) ? '' : '.';
        }));
    }, nav = navigator, o = {
        qS: 0,
        opera: 0,
        oR: 0,
        webkit: 0,
        rK: 0,
        iT: null,
        tN: 0,
        un: 0,
        uv: 0,
        uZ: 0,
        qL: null,
        uF: 0,
        sB: 0,
        vp: nav && nav.wP,
        secure: false,
        nZ: null
    }, ua = uG || (navigator && navigator.userAgent), qh = window && window.location, href = qh && qh.href, m;
    o.secure = href && (href.toLowerCase().indexOf("https") === 0);
    if (ua) {
        if ((/windows|win32/i).test(ua)) {
            o.nZ = 'windows';
        } else if ((/macintosh/i).test(ua)) {
            o.nZ = 'macintosh';
        } else if ((/rhino/i).test(ua)) {
            o.nZ = 'rhino';
        }
        if ((/KHTML/).test(ua)) {
            o.webkit = 1;
        }
        m = ua.match(/AppleWebKit\/([^\s]*)/);
        if (m && m[1]) {
            o.webkit = hu(m[1]);
            if (/ Mobile\//.test(ua)) {
                o.iT = 'Apple';
                m = ua.match(/OS ([^\s]*)/);
                if (m && m[1]) {
                    m = hu(m[1].replace('_', '.'));
                }
                o.qL = m;
                o.un = o.uZ = o.uv = 0;
                m = ua.match(/iPad|iPod|iPhone/);
                if (m && m[0]) {
                    o[m[0].toLowerCase()] = o.qL;
                }
            } else {
                m = ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);
                if (m) {
                    o.iT = m[0];
                }
                if (/webOS/.test(ua)) {
                    o.iT = 'WebOS';
                    m = ua.match(/webOS\/([^\s]*);/);
                    if (m && m[1]) {
                        o.sB = hu(m[1]);
                    }
                }
                if (/ Android/.test(ua)) {
                    o.iT = 'Android';
                    m = ua.match(/Android ([^\s]*);/);
                    if (m && m[1]) {
                        o.uF = hu(m[1]);
                    }
                }
            }
            m = ua.match(/Chrome\/([^\s]*)/);
            if (m && m[1]) {
                o.rK = hu(m[1]);
            } else {
                m = ua.match(/AdobeAIR\/([^\s]*)/);
                if (m) {
                    o.tN = m[0];
                }
            }
        }
        if (!o.webkit) {
            m = ua.match(/Opera[\s\/]([^\s]*)/);
            if (m && m[1]) {
                o.opera = hu(m[1]);
                m = ua.match(/Version\/([^\s]*)/);
                if (m && m[1]) {
                    o.opera = hu(m[1]);
                }
                m = ua.match(/Opera Mini[^;]*/);
                if (m) {
                    o.iT = m[0];
                }
            } else {
                m = ua.match(/MSIE\s([^;]*)/);
                if (m && m[1]) {
                    o.qS = hu(m[1]);
                } else {
                    m = ua.match(/Gecko\/([^\s]*)/);
                    if (m) {
                        o.oR = 1;
                        m = ua.match(/rv:([^\s\)]*)/);
                        if (m && m[1]) {
                            o.oR = hu(m[1]);
                        }
                    }
                }
            }
        }
    }
    return o;
};
QMX.ge.ua = QMX.ge.tG();
(function () {
    QMX.namespace("sq", "widget", "example");
    if ("undefined" !== typeof QMX_config) {
        var l = QMX_config.wG, ls = QMX.ge.qe, unique = true, i;
        if (l) {
            for (i = 0; i < ls.length; i++) {
                if (ls[i] == l) {
                    unique = false;
                    break;
                }
            }
            if (unique) {
                ls.push(l);
            }
        }
    }
})();
QMX.lang = QMX.lang || {};
(function () {
    var L = QMX.lang, jn = Object.prototype, uu = '[object Array]', vd = '[object Function]', tn = '[object Object]',
        tZ = [],
        sk = {'&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#x27;', '/': '&#x2F;', '`': '&#x60;'},
        ra = ["toString", "valueOf"], oI = {
            isArray: function (o) {
                return jn.toString.apply(o) === uu;
            }, vh: function (o) {
                return typeof o === 'boolean';
            }, isFunction: function (o) {
                return (typeof o === 'function') || jn.toString.apply(o) === vd;
            }, wA: function (o) {
                return o === null;
            }, mH: function (o) {
                return typeof o === 'number' && isFinite(o);
            }, iC: function (o) {
                return (o && (typeof o === 'object' || L.isFunction(o))) || false;
            }, mw: function (o) {
                return typeof o === 'string';
            }, pV: function (o) {
                return typeof o === 'undefined';
            }, qr: (QMX.ge.ua.qS) ? function (r, s) {
                var i, kX, f;
                for (i = 0; i < ra.length; i = i + 1) {
                    kX = ra[i];
                    f = s[kX];
                    if (L.isFunction(f) && f != jn[kX]) {
                        r[kX] = f;
                    }
                }
            } : function () {
            }, wg: function (html) {
                return html.replace(/[&<>"'\/`]/g, function (match) {
                    return sk[match];
                });
            }, extend: function (jy, iV, hJ) {
                if (!iV || !jy) {
                    throw new Error("extend failed, please check that " + "all dependencies are included.");
                }
                var F = function () {
                }, i;
                F.prototype = iV.prototype;
                jy.prototype = new F();
                jy.prototype.constructor = jy;
                jy.fr = iV.prototype;
                if (iV.prototype.constructor == jn.constructor) {
                    iV.prototype.constructor = iV;
                }
                if (hJ) {
                    for (i in hJ) {
                        if (L.hasOwnProperty(hJ, i)) {
                            jy.prototype[i] = hJ[i];
                        }
                    }
                    L.qr(jy.prototype, hJ);
                }
            }, ng: function (r, s) {
                if (!s || !r) {
                    throw new Error("Absorb failed, iP dependencies.");
                }
                var a = arguments, i, p, pb = a[2];
                if (pb && pb !== true) {
                    for (i = 2; i < a.length; i = i + 1) {
                        r[a[i]] = s[a[i]];
                    }
                } else {
                    for (p in s) {
                        if (pb || !(p in r)) {
                            r[p] = s[p];
                        }
                    }
                    L.qr(r, s);
                }
                return r;
            }, oK: function (r, s) {
                if (!s || !r) {
                    throw new Error("Augment failed, iP dependencies.");
                }
                var a = [r.prototype, s.prototype], i;
                for (i = 2; i < arguments.length; i = i + 1) {
                    a.push(arguments[i]);
                }
                L.ng.apply(this, a);
                return r;
            }, dump: function (o, d) {
                var i, eI, s = [], nB = "{...}", tJ = "f(){...}", rj = ', ', ARROW = ' => ';
                if (!L.iC(o)) {
                    return o + "";
                } else if (o instanceof Date || ("nodeType" in o && "tagName" in o)) {
                    return o;
                } else if (L.isFunction(o)) {
                    return tJ;
                }
                d = (L.mH(d)) ? d : 3;
                if (L.isArray(o)) {
                    s.push("[");
                    for (i = 0, eI = o.length; i < eI; i = i + 1) {
                        if (L.iC(o[i])) {
                            s.push((d > 0) ? L.dump(o[i], d - 1) : nB);
                        } else {
                            s.push(o[i]);
                        }
                        s.push(rj);
                    }
                    if (s.length > 1) {
                        s.pop();
                    }
                    s.push("]");
                } else {
                    s.push("{");
                    for (i in o) {
                        if (L.hasOwnProperty(o, i)) {
                            s.push(i + ARROW);
                            if (L.iC(o[i])) {
                                s.push((d > 0) ? L.dump(o[i], d - 1) : nB);
                            } else {
                                s.push(o[i]);
                            }
                            s.push(rj);
                        }
                    }
                    if (s.length > 1) {
                        s.pop();
                    }
                    s.push("}");
                }
                return s.join("");
            }, wy: function (s, o, f, tO) {
                var i, j, k, key, v, meta, kj = [], nm, pZ = s.length, tk = 'dump', SPACE = ' ', uO = '{', uQ = '}', dump,
                    pj;
                for (; ;) {
                    i = s.lastIndexOf(uO, pZ);
                    if (i < 0) {
                        break;
                    }
                    j = s.indexOf(uQ, i);
                    if (i + 1 > j) {
                        break;
                    }
                    nm = s.substring(i + 1, j);
                    key = nm;
                    meta = null;
                    k = key.indexOf(SPACE);
                    if (k > -1) {
                        meta = key.substring(k + 1);
                        key = key.substring(0, k);
                    }
                    v = o[key];
                    if (f) {
                        v = f(key, v, meta);
                    }
                    if (L.iC(v)) {
                        if (L.isArray(v)) {
                            v = L.dump(v, parseInt(meta, 10));
                        } else {
                            meta = meta || "";
                            dump = meta.indexOf(tk);
                            if (dump > -1) {
                                meta = meta.substring(4);
                            }
                            pj = v.toString();
                            if (pj === tn || dump > -1) {
                                v = L.dump(v, parseInt(meta, 10));
                            } else {
                                v = pj;
                            }
                        }
                    } else if (!L.mw(v) && !L.mH(v)) {
                        v = "~-" + kj.length + "-~";
                        kj[kj.length] = nm;
                    }
                    s = s.substring(0, i) + v + s.substring(j + 1);
                    if (tO === false) {
                        pZ = i - 1;
                    }
                }
                for (i = kj.length - 1; i >= 0; i = i - 1) {
                    s = s.replace(new RegExp("~-" + i + "-~"), "{" + kj[i] + "}", "g");
                }
                return s;
            }, trim: function (s) {
                try {
                    return s.replace(/^\s+|\s+$/g, "");
                } catch (e) {
                    return s;
                }
            }, merge: function () {
                var o = {}, a = arguments, l = a.length, i;
                for (i = 0; i < l; i = i + 1) {
                    L.ng(o, a[i], true);
                }
                return o;
            }, vF: function (when, o, fn, data, oW) {
                when = when || 0;
                o = o || {};
                var m = fn, d = data, f, r;
                if (L.mw(fn)) {
                    m = o[fn];
                }
                if (!m) {
                    throw new TypeError("method undefined");
                }
                if (!L.pV(data) && !L.isArray(d)) {
                    d = [data];
                }
                f = function () {
                    m.apply(o, d || tZ);
                };
                r = (oW) ? setInterval(f, when) : setTimeout(f, when);
                return {
                    interval: oW, cancel: function () {
                        if (this.interval) {
                            clearInterval(r);
                        } else {
                            clearTimeout(r);
                        }
                    }
                };
            }, wt: function (o) {
                return (L.iC(o) || L.mw(o) || L.mH(o) || L.vh(o));
            }
        };
    L.hasOwnProperty = (jn.hasOwnProperty) ? function (o, prop) {
        return o && o.hasOwnProperty && o.hasOwnProperty(prop);
    } : function (o, prop) {
        return !L.pV(o[prop]) && o.constructor.prototype[prop] !== o[prop];
    };
    oI.ng(L, oI, true);
    QMX.sq.Lang = L;
    L.vB = L.oK;
    QMX.vB = L.oK;
    QMX.extend = L.extend;
})();
QMX.uj("yahoo", QMX, {version: "2.9.0", qR: "2800"});
if (typeof Aostar == "undefined" || !Aostar) Aostar = {};
if (typeof Aostar.df == "undefined" || !Aostar.df) Aostar.df = {};
Aostar.df.et = new function () {
    this.vW = function (i) {
        var h = i.toString(16);
        if ((h.length % 2) == 1) h = '0' + h;
        return h;
    };
    this.rf = function (iS) {
        var h = iS.toString(16);
        if (h.substr(0, 1) != '-') {
            if (h.length % 2 == 1) {
                h = '0' + h;
            } else {
                if (!h.match(/^[0-7]/)) {
                    h = '00' + h;
                }
            }
        } else {
            var sS = h.substr(1);
            var kt = sS.length;
            if (kt % 2 == 1) {
                kt += 1;
            } else {
                if (!h.match(/^[0-7]/)) {
                    kt += 2;
                }
            }
            var pF = '';
            for (var i = 0; i < kt; i++) {
                pF += 'f';
            }
            var tx = new O(pF, 16);
            var vg = tx.xor(iS).add(O.ONE);
            h = vg.toString(16).replace(/^-/, '');
        }
        return h;
    };
    this.wr = function (od, ok) {
        var uo = wR(od);
        var mo = uo.replace(/(.{64})/g, "$1\r\n");
        mo = mo.replace(/\r\n$/, '');
        return "-----BEGIN " + ok + "-----\r\n" + mo + "\r\n-----END " + ok + "-----\r\n";
    };
    this.gb = function (param) {
        var ev = Aostar.df;
        var keys = Object.keys(param);
        if (keys.length != 1) throw "key of param shall be only one.";
        var ack = keys[0];
        if (":bool:int:bitstr:octstr:null:hl:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:nQ:set:dZ:".indexOf(":" + k + ":") == -1) throw "undefined key: " + k;
        if (ack == "bool") return new ev.oJ(param[ack]);
        if (ack == "int") return new ev.gv(param[ack]);
        if (ack == "bitstr") return new ev.nD(param[ack]);
        if (ack == "octstr") return new ev.kg(param[ack]);
        if (ack == "null") return new ev.nl(param[ack]);
        if (ack == "hl") return new ev.kJ(param[ack]);
        if (ack == "enum") return new ev.oO(param[ack]);
        if (ack == "utf8str") return new ev.nn(param[ack]);
        if (ack == "numstr") return new ev.ns(param[ack]);
        if (ack == "prnstr") return new ev.lH(param[ack]);
        if (ack == "telstr") return new ev.mf(param[ack]);
        if (ack == "ia5str") return new ev.mj(param[ack]);
        if (ack == "utctime") return new ev.na(param[ack]);
        if (ack == "gentime") return new ev.mJ(param[ack]);
        if (ack == "nQ") {
            var jt = param[ack];
            var a = [];
            for (var i = 0; i < jt.length; i++) {
                var hs = ev.et.gb(jt[i]);
                a.push(hs);
            }
            return new ev.jA({'array': a});
        }
        if (ack == "set") {
            var jt = param[ack];
            var a = [];
            for (var i = 0; i < jt.length; i++) {
                var hs = ev.et.gb(jt[i]);
                a.push(hs);
            }
            return new ev.lK({'array': a});
        }
        if (ack == "dZ") {
            var he = param[ack];
            if (Object.prototype.toString.call(he) === '[object Array]' && he.length == 3) {
                var eU = ev.et.gb(he[2]);
                return new ev.lw({dZ: he[0], kK: he[1], eU: eU});
            } else {
                var ln = {};
                if (he.kK !== undefined) ln.kK = he.kK;
                if (he.dZ !== undefined) ln.dZ = he.dZ;
                if (he.eU === undefined) throw "eU shall be specified for 'dZ'.";
                ln.eU = ev.et.gb(he.eU);
                return new ev.lw(ln);
            }
        }
    };
    this.vn = function (param) {
        var hs = this.gb(param);
        return hs.ew();
    };
};
Aostar.df.et.kF = function (cn) {
    var s = "";
    var pW = parseInt(cn.substr(0, 2), 16);
    var fT = Math.floor(pW / 40);
    var sK = pW % 40;
    var s = fT + "." + sK;
    var kD = "";
    for (var i = 2; i < cn.length; i += 2) {
        var value = parseInt(cn.substr(i, 2), 16);
        var jP = ("00000000" + value.toString(2)).slice(-8);
        kD = kD + jP.substr(1, 7);
        if (jP.substr(0, 1) == "0") {
            var eK = new O(kD, 2);
            s = s + "." + eK.toString(10);
            kD = "";
        }
    }
    ;
    return s;
};
Aostar.df.et.wE = function (jw) {
    var jc = function (i) {
        var h = i.toString(16);
        if (h.length == 1) h = '0' + h;
        return h;
    };
    var mW = function (nr) {
        var h = '';
        var eK = new O(nr, 10);
        var b = eK.toString(2);
        var hz = 7 - b.length % 7;
        if (hz == 7) hz = 0;
        var lh = '';
        for (var i = 0; i < hz; i++) lh += '0';
        b = lh + b;
        for (var i = 0; i < b.length - 1; i += 7) {
            var gB = b.substr(i, 7);
            if (i != b.length - 7) gB = '1' + gB;
            h += jc(parseInt(gB, 2));
        }
        return h;
    };
    if (!jw.match(/^[0-9.]+$/)) {
        throw "malformed hl string: " + jw;
    }
    var h = '';
    var a = jw.split('.');
    var fT = parseInt(a[0]) * 40 + parseInt(a[1]);
    h += jc(fT);
    a.splice(0, 2);
    for (var i = 0; i < a.length; i++) {
        h += mW(a[i]);
    }
    return h;
};
Aostar.df.gk = function () {
    var fp = true;
    var eu = null;
    var fs = '00';
    var kU = '00';
    var cD = '';
    this.st = function () {
        if (typeof this.cD == "undefined" || this.cD == null) {
            throw "this.cD is null lu undefined.";
        }
        if (this.cD.length % 2 == 1) {
            throw "value cn must be even length: n=" + cD.length + ",v=" + this.cD;
        }
        var n = this.cD.length / 2;
        var ji = n.toString(16);
        if (ji.length % 2 == 1) {
            ji = "0" + ji;
        }
        if (n < 128) {
            return ji;
        } else {
            var qN = ji.length / 2;
            if (qN > 15) {
                throw "ASN.1 length too long to represent by 8x: n = " + n.toString(16);
            }
            var head = 128 + qN;
            return head.toString(16) + ji;
        }
    };
    this.ew = function () {
        if (this.eu == null || this.fp) {
            this.cD = this.ep();
            this.kU = this.st();
            this.eu = this.fs + this.kU + this.cD;
            this.fp = false;
        }
        return this.eu;
    };
    this.wo = function () {
        this.ew();
        return this.cD;
    };
    this.ep = function () {
        return '';
    };
};
Aostar.df.gF = function (cE) {
    Aostar.df.gF.fr.constructor.call(this);
    var s = null;
    var cD = null;
    this.sN = function () {
        return this.s;
    };
    this.fQ = function (kQ) {
        this.eu = null;
        this.fp = true;
        this.s = kQ;
        this.cD = jD(this.s);
    };
    this.oQ = function (gT) {
        this.eu = null;
        this.fp = true;
        this.s = null;
        this.cD = gT;
    };
    this.ep = function () {
        return this.cD;
    };
    if (typeof cE != "undefined") {
        if (typeof cE == "string") {
            this.fQ(cE);
        } else if (typeof cE['ee'] != "undefined") {
            this.fQ(cE['ee']);
        } else if (typeof cE['cn'] != "undefined") {
            this.oQ(cE['cn']);
        }
    }
};
QMX.lang.extend(Aostar.df.gF, Aostar.df.gk);
Aostar.df.lx = function (cE) {
    Aostar.df.lx.fr.constructor.call(this);
    var s = null;
    var date = null;
    this.uM = function (d) {
        jQ = d.getTime() + (d.getTimezoneOffset() * 60000);
        var rR = new Date(jQ);
        return rR;
    };
    this.formatDate = function (jm, type, ks) {
        var gZ = this.mk;
        var d = this.uM(jm);
        var year = String(d.getFullYear());
        if (type == 'jQ') year = year.substr(2, 2);
        var month = gZ(String(d.getMonth() + 1), 2);
        var pk = gZ(String(d.getDate()), 2);
        var pr = gZ(String(d.getHours()), 2);
        var min = gZ(String(d.getMinutes()), 2);
        var lP = gZ(String(d.getSeconds()), 2);
        var s = year + month + pk + pr + min + lP;
        if (ks === true) {
            var ml = d.getMilliseconds();
            if (ml != 0) {
                var nH = gZ(String(ml), 3);
                nH = nH.replace(/[0]+$/, "");
                s = s + "." + nH;
            }
        }
        return s + "Z";
    };
    this.mk = function (s, eI) {
        if (s.length >= eI) return s;
        return new Array(eI - s.length + 1).join('0') + s;
    };
    this.sN = function () {
        return this.s;
    };
    this.fQ = function (kQ) {
        this.eu = null;
        this.fp = true;
        this.s = kQ;
        this.cD = jD(kQ);
    };
    this.vZ = function (year, month, pk, pr, min, lP) {
        var jm = new Date(Date.UTC(year, month - 1, pk, pr, min, lP, 0));
        this.kR(jm);
    };
    this.ep = function () {
        return this.cD;
    };
};
QMX.lang.extend(Aostar.df.lx, Aostar.df.gk);
Aostar.df.ph = function (cE) {
    Aostar.df.gF.fr.constructor.call(this);
    var fV = null;
    this.vS = function (tq) {
        this.eu = null;
        this.fp = true;
        this.fV = tq;
    };
    this.wz = function (fW) {
        this.eu = null;
        this.fp = true;
        this.fV.push(fW);
    };
    this.fV = new Array();
    if (typeof cE != "undefined") {
        if (typeof cE['array'] != "undefined") {
            this.fV = cE['array'];
        }
    }
};
QMX.lang.extend(Aostar.df.ph, Aostar.df.gk);
Aostar.df.oJ = function () {
    Aostar.df.oJ.fr.constructor.call(this);
    this.fs = "01";
    this.eu = "0101ff";
};
QMX.lang.extend(Aostar.df.oJ, Aostar.df.gk);
Aostar.df.gv = function (cE) {
    Aostar.df.gv.fr.constructor.call(this);
    this.fs = "02";
    this.le = function (iS) {
        this.eu = null;
        this.fp = true;
        this.cD = Aostar.df.et.rf(iS);
    };
    this.jE = function (gD) {
        var eK = new O(String(gD), 10);
        this.le(eK);
    };
    this.jr = function (gT) {
        this.cD = gT;
    };
    this.ep = function () {
        return this.cD;
    };
    if (typeof cE != "undefined") {
        if (typeof cE['jR'] != "undefined") {
            this.le(cE['jR']);
        } else if (typeof cE['int'] != "undefined") {
            this.jE(cE['int']);
        } else if (typeof cE == "number") {
            this.jE(cE);
        } else if (typeof cE['cn'] != "undefined") {
            this.jr(cE['cn']);
        }
    }
};
QMX.lang.extend(Aostar.df.gv, Aostar.df.gk);
Aostar.df.nD = function (cE) {
    if (cE !== undefined && typeof cE.eU !== "undefined") {
        var o = Aostar.df.et.gb(cE.eU);
        cE.cn = "00" + o.ew();
    }
    Aostar.df.nD.fr.constructor.call(this);
    this.fs = "03";
    this.ny = function (ut) {
        this.eu = null;
        this.fp = true;
        this.cD = ut;
    };
    this.wS = function (gA, sY) {
        if (gA < 0 || 7 < gA) {
            throw "unused gR shall be from 0 to 7: u = " + gA;
        }
        var sD = "0" + gA;
        this.eu = null;
        this.fp = true;
        this.cD = sD + sY;
    };
    this.oM = function (jp) {
        jp = jp.replace(/0+$/, '');
        var gA = 8 - jp.length % 8;
        if (gA == 8) gA = 0;
        for (var i = 0; i <= gA; i++) {
            jp += '0';
        }
        var h = '';
        for (var i = 0; i < jp.length - 1; i += 8) {
            var b = jp.substr(i, 8);
            var x = parseInt(b, 2).toString(16);
            if (x.length == 1) x = '0' + x;
            h += x;
        }
        this.eu = null;
        this.fp = true;
        this.cD = '0' + gA + h;
    };
    this.ti = function (pS) {
        var s = '';
        for (var i = 0; i < pS.length; i++) {
            if (pS[i] == true) {
                s += '1';
            } else {
                s += '0';
            }
        }
        this.oM(s);
    };
    this.vo = function (oz) {
        var a = new Array(oz);
        for (var i = 0; i < oz; i++) {
            a[i] = false;
        }
        return a;
    };
    this.ep = function () {
        return this.cD;
    };
    if (typeof cE != "undefined") {
        if (typeof cE == "string" && cE.toLowerCase().match(/^[0-9a-f]+$/)) {
            this.ny(cE);
        } else if (typeof cE['cn'] != "undefined") {
            this.ny(cE['cn']);
        } else if (typeof cE['jP'] != "undefined") {
            this.oM(cE['jP']);
        } else if (typeof cE['array'] != "undefined") {
            this.ti(cE['array']);
        }
    }
};
QMX.lang.extend(Aostar.df.nD, Aostar.df.gk);
Aostar.df.kg = function (cE) {
    if (cE !== undefined && typeof cE.eU !== "undefined") {
        var o = Aostar.df.et.gb(cE.eU);
        cE.cn = o.ew();
    }
    Aostar.df.kg.fr.constructor.call(this, cE);
    this.fs = "04";
};
QMX.lang.extend(Aostar.df.kg, Aostar.df.gF);
Aostar.df.nl = function () {
    Aostar.df.nl.fr.constructor.call(this);
    this.fs = "05";
    this.eu = "0500";
};
QMX.lang.extend(Aostar.df.nl, Aostar.df.gk);
Aostar.df.kJ = function (cE) {
    var jc = function (i) {
        var h = i.toString(16);
        if (h.length == 1) h = '0' + h;
        return h;
    };
    var mW = function (nr) {
        var h = '';
        var eK = new O(nr, 10);
        var b = eK.toString(2);
        var hz = 7 - b.length % 7;
        if (hz == 7) hz = 0;
        var lh = '';
        for (var i = 0; i < hz; i++) lh += '0';
        b = lh + b;
        for (var i = 0; i < b.length - 1; i += 7) {
            var gB = b.substr(i, 7);
            if (i != b.length - 7) gB = '1' + gB;
            h += jc(parseInt(gB, 2));
        }
        return h;
    };
    Aostar.df.kJ.fr.constructor.call(this);
    this.fs = "06";
    this.jr = function (gT) {
        this.eu = null;
        this.fp = true;
        this.s = null;
        this.cD = gT;
    };
    this.nT = function (jw) {
        if (!jw.match(/^[0-9.]+$/)) {
            throw "malformed hl string: " + jw;
        }
        var h = '';
        var a = jw.split('.');
        var fT = parseInt(a[0]) * 40 + parseInt(a[1]);
        h += jc(fT);
        a.splice(0, 2);
        for (var i = 0; i < a.length; i++) {
            h += mW(a[i]);
        }
        this.eu = null;
        this.fp = true;
        this.s = null;
        this.cD = h;
    };
    this.pa = function (ff) {
        var hl = Aostar.df.jF.ih.vE(ff);
        if (hl !== '') {
            this.nT(hl);
        } else {
            throw "kJ ff undefined: " + ff;
        }
    };
    this.ep = function () {
        return this.cD;
    };
    if (cE !== undefined) {
        if (typeof cE === "string") {
            if (cE.match(/^[0-2].[0-9.]+$/)) {
                this.nT(cE);
            } else {
                this.pa(cE);
            }
        } else if (cE.hl !== undefined) {
            this.nT(cE.hl);
        } else if (cE.cn !== undefined) {
            this.jr(cE.cn);
        } else if (cE.name !== undefined) {
            this.pa(cE.name);
        }
    }
};
QMX.lang.extend(Aostar.df.kJ, Aostar.df.gk);
Aostar.df.oO = function (cE) {
    Aostar.df.oO.fr.constructor.call(this);
    this.fs = "0a";
    this.le = function (iS) {
        this.eu = null;
        this.fp = true;
        this.cD = Aostar.df.et.rf(iS);
    };
    this.jE = function (gD) {
        var eK = new O(String(gD), 10);
        this.le(eK);
    };
    this.jr = function (gT) {
        this.cD = gT;
    };
    this.ep = function () {
        return this.cD;
    };
    if (typeof cE != "undefined") {
        if (typeof cE['int'] != "undefined") {
            this.jE(cE['int']);
        } else if (typeof cE == "number") {
            this.jE(cE);
        } else if (typeof cE['cn'] != "undefined") {
            this.jr(cE['cn']);
        }
    }
};
QMX.lang.extend(Aostar.df.oO, Aostar.df.gk);
Aostar.df.nn = function (cE) {
    Aostar.df.nn.fr.constructor.call(this, cE);
    this.fs = "0c";
};
QMX.lang.extend(Aostar.df.nn, Aostar.df.gF);
Aostar.df.ns = function (cE) {
    Aostar.df.ns.fr.constructor.call(this, cE);
    this.fs = "12";
};
QMX.lang.extend(Aostar.df.ns, Aostar.df.gF);
Aostar.df.lH = function (cE) {
    Aostar.df.lH.fr.constructor.call(this, cE);
    this.fs = "13";
};
QMX.lang.extend(Aostar.df.lH, Aostar.df.gF);
Aostar.df.mf = function (cE) {
    Aostar.df.mf.fr.constructor.call(this, cE);
    this.fs = "14";
};
QMX.lang.extend(Aostar.df.mf, Aostar.df.gF);
Aostar.df.mj = function (cE) {
    Aostar.df.mj.fr.constructor.call(this, cE);
    this.fs = "16";
};
QMX.lang.extend(Aostar.df.mj, Aostar.df.gF);
Aostar.df.na = function (cE) {
    Aostar.df.na.fr.constructor.call(this, cE);
    this.fs = "17";
    this.kR = function (jm) {
        this.eu = null;
        this.fp = true;
        this.date = jm;
        this.s = this.formatDate(this.date, 'jQ');
        this.cD = jD(this.s);
    };
    this.ep = function () {
        if (typeof this.date == "undefined" && typeof this.s == "undefined") {
            this.date = new Date();
            this.s = this.formatDate(this.date, 'jQ');
            this.cD = jD(this.s);
        }
        return this.cD;
    };
    if (cE !== undefined) {
        if (cE.ee !== undefined) {
            this.fQ(cE.ee);
        } else if (typeof cE == "string" && cE.match(/^[0-9]{12}Z$/)) {
            this.fQ(cE);
        } else if (cE.cn !== undefined) {
            this.oQ(cE.cn);
        } else if (cE.date !== undefined) {
            this.kR(cE.date);
        }
    }
};
QMX.lang.extend(Aostar.df.na, Aostar.df.lx);
Aostar.df.mJ = function (cE) {
    Aostar.df.mJ.fr.constructor.call(this, cE);
    this.fs = "18";
    this.ks = false;
    this.kR = function (jm) {
        this.eu = null;
        this.fp = true;
        this.date = jm;
        this.s = this.formatDate(this.date, 'gen', this.ks);
        this.cD = jD(this.s);
    };
    this.ep = function () {
        if (this.date === undefined && this.s === undefined) {
            this.date = new Date();
            this.s = this.formatDate(this.date, 'gen', this.ks);
            this.cD = jD(this.s);
        }
        return this.cD;
    };
    if (cE !== undefined) {
        if (cE.ee !== undefined) {
            this.fQ(cE.ee);
        } else if (typeof cE == "string" && cE.match(/^[0-9]{14}Z$/)) {
            this.fQ(cE);
        } else if (cE.cn !== undefined) {
            this.oQ(cE.cn);
        } else if (cE.date !== undefined) {
            this.kR(cE.date);
        }
        if (cE.ml === true) {
            this.ks = true;
        }
    }
};
QMX.lang.extend(Aostar.df.mJ, Aostar.df.lx);
Aostar.df.jA = function (cE) {
    Aostar.df.jA.fr.constructor.call(this, cE);
    this.fs = "30";
    this.ep = function () {
        var h = '';
        for (var i = 0; i < this.fV.length; i++) {
            var hs = this.fV[i];
            h += hs.ew();
        }
        this.cD = h;
        return this.cD;
    };
};
QMX.lang.extend(Aostar.df.jA, Aostar.df.ph);
Aostar.df.lK = function (cE) {
    Aostar.df.lK.fr.constructor.call(this, cE);
    this.fs = "31";
    this.qo = true;
    this.ep = function () {
        var a = new Array();
        for (var i = 0; i < this.fV.length; i++) {
            var hs = this.fV[i];
            a.push(hs.ew());
        }
        if (this.qo == true) a.sort();
        this.cD = a.join('');
        return this.cD;
    };
    if (typeof cE != "undefined") {
        if (typeof cE.sP != "undefined" && cE.sP == false) this.qo = false;
    }
};
QMX.lang.extend(Aostar.df.lK, Aostar.df.ph);
Aostar.df.lw = function (cE) {
    Aostar.df.lw.fr.constructor.call(this);
    this.fs = "a0";
    this.cD = '';
    this.kr = true;
    this.fW = null;
    this.si = function (uN, ou, fW) {
        this.fs = ou;
        this.kr = uN;
        this.fW = fW;
        if (this.kr) {
            this.cD = this.fW.ew();
            this.eu = null;
            this.fp = true;
        } else {
            this.cD = null;
            this.eu = fW.ew();
            this.eu = this.eu.replace(/^../, ou);
            this.fp = false;
        }
    };
    this.ep = function () {
        return this.cD;
    };
    if (typeof cE != "undefined") {
        if (typeof cE['dZ'] != "undefined") {
            this.fs = cE['dZ'];
        }
        if (typeof cE['kK'] != "undefined") {
            this.kr = cE['kK'];
        }
        if (typeof cE['eU'] != "undefined") {
            this.fW = cE['eU'];
            this.si(this.kr, this.fs, this.fW);
        }
    }
};
QMX.lang.extend(Aostar.df.lw, Aostar.df.gk);
var cB = new function () {
};
cB.oZ = function (s, pos) {
    if (s.substring(pos + 2, pos + 3) != '8') return 1;
    var i = parseInt(s.substring(pos + 3, pos + 4));
    if (i == 0) return -1;
    if (0 < i && i < 10) return i + 1;
    return -2;
};
cB.mQ = function (s, pos) {
    var eI = cB.oZ(s, pos);
    if (eI < 1) return '';
    return s.substring(pos + 2, pos + 2 + eI * 2);
};
cB.lz = function (s, pos) {
    var lg = cB.mQ(s, pos);
    if (lg == '') return -1;
    var eK;
    if (parseInt(lg.substring(0, 1)) < 8) {
        eK = new O(lg, 16);
    } else {
        eK = new O(lg.substring(2), 16);
    }
    return eK.gD();
};
cB.ow = function (s, pos) {
    var mP = cB.oZ(s, pos);
    if (mP < 0) return mP;
    return pos + (mP + 1) * 2;
};
cB.eo = function (s, pos) {
    var kl = cB.ow(s, pos);
    var eI = cB.lz(s, pos);
    return s.substring(kl, kl + eI * 2);
};
cB.rU = function (s, pos) {
    var fs = s.substr(pos, 2);
    var kU = cB.mQ(s, pos);
    var cD = cB.eo(s, pos);
    return fs + kU + cD;
};
cB.sO = function (s, pos) {
    var kl = cB.ow(s, pos);
    var eI = cB.lz(s, pos);
    return kl + eI * 2;
};
cB.hj = function (h, pos) {
    var a = new Array();
    var kh = cB.ow(h, pos);
    if (h.substr(pos, 2) == "03") {
        a.push(kh + 2);
    } else {
        a.push(kh);
    }
    var eI = cB.lz(h, pos);
    var p = kh;
    var k = 0;
    while (1) {
        var ki = cB.sO(h, p);
        if (ki == null || (ki - kh >= (eI * 2))) break;
        if (k >= 200) break;
        a.push(ki);
        p = ki;
        k++;
    }
    return a;
};
cB.ws = function (h, cj, nth) {
    var a = cB.hj(h, cj);
    return a[nth];
};
cB.lF = function (h, gz, fO) {
    if (fO.length == 0) {
        return gz;
    }
    var uC = fO.shift();
    var a = cB.hj(h, gz);
    return cB.lF(h, a[uC], fO);
};
cB.xd = function (h, gz, fO) {
    var cj = cB.lF(h, gz, fO);
    return cB.rU(h, cj);
};
cB.wp = function (h, gz, fO) {
    var cj = cB.lF(h, gz, fO);
    return cB.eo(h, cj);
};
cB.wT = function (h, gz, fO, pn) {
    var cj = cB.lF(h, gz, fO);
    if (cj === undefined) {
        throw "can't find fO object";
    }
    if (pn !== undefined) {
        if (h.substr(cj, 2) != pn) {
            throw "checking dZ doesn't match: " + h.substr(cj, 2) + "!=" + pn;
        }
    }
    return cB.eo(h, cj);
};
cB.wn = function (cn) {
    var mk = function (s, eI) {
        if (s.length >= eI) return s;
        return new Array(eI - s.length + 1).join('0') + s;
    };
    var a = [];
    var rq = cn.substr(0, 2);
    var fT = parseInt(rq, 16);
    a[0] = new String(Math.floor(fT / 40));
    a[1] = new String(fT % 40);
    var pJ = cn.substr(2);
    var b = [];
    for (var i = 0; i < pJ.length / 2; i++) {
        b.push(parseInt(pJ.substr(i * 2, 2), 16));
    }
    var c = [];
    var hM = "";
    for (var i = 0; i < b.length; i++) {
        if (b[i] & 0x80) {
            hM = hM + mk((b[i] & 0x7f).toString(2), 7);
        } else {
            hM = hM + mk((b[i] & 0x7f).toString(2), 7);
            c.push(new String(parseInt(hM, 2)));
            hM = "";
        }
    }
    var s = a.join(".");
    if (c.length > 0) s = s + "." + c.join(".");
    return s;
};
cB.dump = function (iL, eH, cj, indent) {
    var cn = iL;
    if (iL instanceof Aostar.df.gk) cn = iL.ew();
    var ke = function (cn, gN) {
        if (cn.length <= gN * 2) {
            return cn;
        } else {
            var s = cn.substr(0, gN) + "..(total " + cn.length / 2 + "gI).." + cn.substr(cn.length - gN, gN);
            return s;
        }
        ;
    };
    if (eH === undefined) eH = {"ps": 32};
    if (cj === undefined) cj = 0;
    if (indent === undefined) indent = "";
    var iq = eH.ps;
    if (cn.substr(cj, 2) == "01") {
        var v = cB.eo(cn, cj);
        if (v == "00") {
            return indent + "BOOLEAN FALSE\n";
        } else {
            return indent + "BOOLEAN TRUE\n";
        }
    }
    if (cn.substr(cj, 2) == "02") {
        var v = cB.eo(cn, cj);
        return indent + "INTEGER " + ke(v, iq) + "\n";
    }
    if (cn.substr(cj, 2) == "03") {
        var v = cB.eo(cn, cj);
        return indent + "BITSTRING " + ke(v, iq) + "\n";
    }
    if (cn.substr(cj, 2) == "04") {
        var v = cB.eo(cn, cj);
        if (cB.ql(v)) {
            var s = indent + "OCTETSTRING, encapsulates\n";
            s = s + cB.dump(v, eH, 0, indent + "  ");
            return s;
        } else {
            return indent + "OCTETSTRING " + ke(v, iq) + "\n";
        }
    }
    if (cn.substr(cj, 2) == "05") {
        return indent + "NULL\n";
    }
    if (cn.substr(cj, 2) == "06") {
        var cD = cB.eo(cn, cj);
        var ga = Aostar.df.et.kF(cD);
        var ff = Aostar.df.jF.ih.oP(ga);
        var jl = ga.replace(/\./g, ' ');
        if (ff != '') {
            return indent + "ObjectIdentifier " + ff + " (" + jl + ")\n";
        } else {
            return indent + "ObjectIdentifier (" + jl + ")\n";
        }
    }
    if (cn.substr(cj, 2) == "0c") {
        return indent + "UTF8String '" + fD(cB.eo(cn, cj)) + "'\n";
    }
    if (cn.substr(cj, 2) == "13") {
        return indent + "PrintableString '" + fD(cB.eo(cn, cj)) + "'\n";
    }
    if (cn.substr(cj, 2) == "14") {
        return indent + "TeletexString '" + fD(cB.eo(cn, cj)) + "'\n";
    }
    if (cn.substr(cj, 2) == "16") {
        return indent + "IA5String '" + fD(cB.eo(cn, cj)) + "'\n";
    }
    if (cn.substr(cj, 2) == "17") {
        return indent + "UTCTime " + fD(cB.eo(cn, cj)) + "\n";
    }
    if (cn.substr(cj, 2) == "18") {
        return indent + "GeneralizedTime " + fD(cB.eo(cn, cj)) + "\n";
    }
    if (cn.substr(cj, 2) == "30") {
        if (cn.substr(cj, 4) == "3000") {
            return indent + "SEQUENCE {}\n";
        }
        var s = indent + "SEQUENCE\n";
        var eb = cB.hj(cn, cj);
        var kw = eH;
        if ((eb.length == 2 || eb.length == 3) && cn.substr(eb[0], 2) == "06" && cn.substr(eb[eb.length - 1], 2) == "04") {
            var pi = cB.eo(cn, eb[0]);
            var ga = Aostar.df.et.kF(pi);
            var ff = Aostar.df.jF.ih.oP(ga);
            var lj = JSON.parse(JSON.stringify(eH));
            lj.lN = ff;
            kw = lj;
        }
        for (var i = 0; i < eb.length; i++) {
            s = s + cB.dump(cn, kw, eb[i], indent + "  ");
        }
        return s;
    }
    if (cn.substr(cj, 2) == "31") {
        var s = indent + "SET\n";
        var eb = cB.hj(cn, cj);
        for (var i = 0; i < eb.length; i++) {
            s = s + cB.dump(cn, eH, eb[i], indent + "  ");
        }
        return s;
    }
    var dZ = parseInt(cn.substr(cj, 2), 16);
    if ((dZ & 128) != 0) {
        var hB = dZ & 31;
        if ((dZ & 32) != 0) {
            var s = indent + "[" + hB + "]\n";
            var eb = cB.hj(cn, cj);
            for (var i = 0; i < eb.length; i++) {
                s = s + cB.dump(cn, eH, eb[i], indent + "  ");
            }
            return s;
        } else {
            var v = cB.eo(cn, cj);
            if (v.substr(0, 8) == "68747470") {
                v = fD(v);
            }
            if (eH.lN === "subjectAltName" && hB == 2) {
                v = fD(v);
            }
            var s = indent + "[" + hB + "] " + v + "\n";
            return s;
        }
    }
    return indent + "UNKNOWN(" + cn.substr(cj, 2) + ") " + cB.eo(cn, cj) + "\n";
};
cB.lp = function (iL, eH, cj) {
    var cn = iL;
    if (iL instanceof Aostar.df.gk) cn = iL.ew();
    var ke = function (cn, gN) {
        if (cn.length <= gN * 2) {
            return cn;
        } else {
            var s = cn.substr(0, gN) + cn.substr(cn.length - gN, gN);
            return s;
        }
        ;
    };
    if (eH === undefined) eH = {"ps": 32};
    if (cj === undefined) cj = 0;
    var iq = eH.ps;
    if (cn.substr(cj, 2) == "01") {
        var v = cB.eo(cn, cj);
        if (v == "00") {
            return false;
        } else {
            return true;
        }
    }
    if (cn.substr(cj, 2) == "02") {
        var v = cB.eo(cn, cj);
        return v;
    }
    if (cn.substr(cj, 2) == "03") {
        var v = cB.eo(cn, cj);
        return ke(v, iq);
    }
    if (cn.substr(cj, 2) == "04") {
        var v = cB.eo(cn, cj);
        if (cB.ql(v)) {
            var s = new Array();
            s.push(cB.lp(v, eH, 0));
            return s;
        } else {
            return v;
        }
    }
    if (cn.substr(cj, 2) == "05") {
        return "";
    }
    if (cn.substr(cj, 2) == "06") {
        var cD = cB.eo(cn, cj);
        var ga = Aostar.df.et.kF(cD);
        var ff = Aostar.df.jF.ih.oP(ga);
        var jl = ga.replace(/\./g, ' ');
        if (ff != '') {
            return jl;
        } else {
            return jl;
        }
    }
    if (cn.substr(cj, 2) == "0c") {
        return fD(cB.eo(cn, cj));
    }
    if (cn.substr(cj, 2) == "13") {
        return fD(cB.eo(cn, cj));
    }
    if (cn.substr(cj, 2) == "14") {
        return fD(cB.eo(cn, cj));
    }
    if (cn.substr(cj, 2) == "16") {
        return fD(cB.eo(cn, cj));
    }
    if (cn.substr(cj, 2) == "17") {
        return fD(cB.eo(cn, cj));
    }
    if (cn.substr(cj, 2) == "18") {
        return fD(cB.eo(cn, cj));
    }
    if (cn.substr(cj, 2) == "30") {
        var s = new Array();
        if (cn.substr(cj, 4) == "3000") {
            return s;
        }
        var eb = cB.hj(cn, cj);
        var kw = eH;
        if ((eb.length == 2 || eb.length == 3) && cn.substr(eb[0], 2) == "06" && cn.substr(eb[eb.length - 1], 2) == "04") {
            var pi = cB.eo(cn, eb[0]);
            var ga = Aostar.df.et.kF(pi);
            var ff = Aostar.df.jF.ih.oP(ga);
            var lj = JSON.parse(JSON.stringify(eH));
            lj.lN = ff;
            kw = lj;
        }
        for (var i = 0; i < eb.length; i++) {
            s.push(cB.lp(cn, kw, eb[i]));
        }
        return s;
    }
    if (cn.substr(cj, 2) == "31") {
        var s = new Array();
        ;var eb = cB.hj(cn, cj);
        for (var i = 0; i < eb.length; i++) {
            s.push(cB.lp(cn, eH, eb[i]));
        }
        return s;
    }
    var dZ = parseInt(cn.substr(cj, 2), 16);
    var indent = "";
    if ((dZ & 128) != 0) {
        var hB = dZ & 31;
        if ((dZ & 32) != 0) {
            var s = indent + "[" + hB + "]\n";
            var eb = cB.hj(cn, cj);
            for (var i = 0; i < eb.length; i++) {
                s = s + cB.dump(cn, eH, eb[i], indent + "  ");
            }
            return s;
        } else {
            var v = cB.eo(cn, cj);
            if (v.substr(0, 8) == "68747470") {
                v = fD(v);
            }
            if (eH.lN === "subjectAltName" && hB == 2) {
                v = fD(v);
            }
            var s = indent + "[" + hB + "] " + v + "\n";
            return s;
        }
    }
    return indent + "UNKNOWN(" + cn.substr(cj, 2) + ") " + cB.eo(cn, cj) + "\n";
};
cB.ql = function (cn) {
    if (cn.length % 2 == 1) return false;
    var ta = cB.lz(cn, 0);
    var tV = cn.substr(0, 2);
    var vL = cB.mQ(cn, 0);
    var rN = cn.length - tV.length - vL.length;
    if (rN == ta * 2) return true;
    return false;
};
var je = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var lE = "=";

function dP(h) {
    var i;
    var c;
    var er = "";
    for (i = 0; i + 3 <= h.length; i += 3) {
        c = parseInt(h.substring(i, i + 3), 16);
        er += je.charAt(c >> 6) + je.charAt(c & 63);
    }
    if (i + 1 == h.length) {
        c = parseInt(h.substring(i, i + 1), 16);
        er += je.charAt(c << 2);
    } else if (i + 2 == h.length) {
        c = parseInt(h.substring(i, i + 2), 16);
        er += je.charAt(c >> 2) + je.charAt((c & 3) << 4);
    }
    if (lE) while ((er.length & 3) > 0) er += lE;
    return er;
};

function dR(s) {
    var er = "";
    var i;
    var k = 0;
    var jv;
    var v;
    for (i = 0; i < s.length; ++i) {
        if (s.charAt(i) == lE) break;
        v = je.indexOf(s.charAt(i));
        if (v < 0) continue;
        if (k == 0) {
            er += av(v >> 2);
            jv = v & 3;
            k = 1;
        } else if (k == 1) {
            er += av((jv << 2) | (v >> 4));
            jv = v & 0xf;
            k = 2;
        } else if (k == 2) {
            er += av(jv);
            er += av(v >> 2);
            jv = v & 3;
            k = 3;
        } else {
            er += av((jv << 2) | (v >> 4));
            er += av(v & 0xf);
            k = 0;
        }
    }
    if (k == 1) er += av(jv << 2);
    return er;
};

function dq(s) {
    var h = dR(s);
    var i;
    var a = new Array();
    for (i = 0; 2 * i < h.length; ++i) {
        a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);
    }
    return a;
};AostarJS.js.iU || (function (undefined) {
    var C = AostarJS;
    var fK = C.js;
    var Base = fK.Base;
    var fE = fK.fE;
    var jj = fK.jj;
    var iZ = C.el;
    var fM = iZ.fM;
    var lW = iZ.lW;
    var lv = C.hk;
    var qm = lv.qm;
    var iU = fK.iU = jj.extend({
        cf: Base.extend(), oX: function (key, cf) {
            return this.create(this.mg, key, cf);
        }, pg: function (key, cf) {
            return this.create(this.uc, key, cf);
        }, eZ: function (qW, key, cf) {
            this.cf = this.cf.extend(cf);
            this.rn = qW;
            this.wY = key;
            this.reset();
        }, reset: function () {
            jj.reset.call(this);
            this.qg();
        }, wm: function (kc) {
            this.jM(kc);
            return this.ig();
        }, gS: function (kc) {
            if (kc) {
                this.jM(kc);
            }
            var tz = this.mE();
            return tz;
        }, gc: 128 / 32, iQ: 128 / 32, mg: 1, uc: 2, qa: (function () {
            function bB(key) {
                if (typeof key == 'string') {
                    return oU;
                } else {
                    return iW;
                }
            };
            return function (eF) {
                return {
                    jX: function (message, key, cf) {
                        return bB(key).jX(eF, message, key, cf);
                    }, jV: function (fk, key, cf) {
                        return bB(key).jV(eF, fk, key, cf);
                    }
                };
            };
        }())
    });
    var sQ = fK.sQ = iU.extend({
        mE: function () {
            var lf = this.ig(!!'flush');
            return lf;
        }, eG: 1
    });
    var tg = C.mode = {};
    var qD = fK.qD = Base.extend({
        oX: function (eF, fa) {
            return this.rX.create(eF, fa);
        }, pg: function (eF, fa) {
            return this.rw.create(eF, fa);
        }, eZ: function (eF, fa) {
            this.qi = eF;
            this.rc = fa;
        }
    });
    var hi = tg.hi = (function () {
        var hi = qD.extend();
        hi.rX = hi.extend({
            oa: function (da, offset) {
                var eF = this.qi;
                var eG = eF.eG;
                au.call(this, da, offset, eG);
                eF.vM(da, offset);
                this.oB = da.slice(offset, offset + eG);
            }
        });
        hi.rw = hi.extend({
            oa: function (da, offset) {
                var eF = this.qi;
                var eG = eF.eG;
                var rv = da.slice(offset, offset + eG);
                eF.vx(da, offset);
                au.call(this, da, offset, eG);
                this.oB = rv;
            }
        });

        function au(da, offset, eG) {
            var fa = this.rc;
            if (fa) {
                var block = fa;
                this.rc = undefined;
            } else {
                var block = this.oB;
            }
            for (var i = 0; i < eG; i++) {
                da[offset + i] ^= block[i];
            }
        };
        return hi;
    }());
    var sf = C.gZ = {};
    var nS = sf.nS = {
        gZ: function (data, eG) {
            var jY = eG * 4;
            var hA = jY - data.fg % jY;
            var tA = (hA << 24) | (hA << 16) | (hA << 8) | hA;
            var nA = [];
            for (var i = 0; i < hA; i += 4) {
                nA.push(tA);
            }
            var padding = fE.create(nA, hA);
            data.concat(padding);
        }, sg: function (data) {
            var hA = data.da[(data.fg - 1) >>> 2] & 0xff;
            data.fg -= hA;
        }
    };
    var tC = fK.tC = iU.extend({
        cf: iU.cf.extend({mode: hi, padding: nS}), reset: function () {
            iU.reset.call(this);
            var cf = this.cf;
            var fa = cf.fa;
            var mode = cf.mode;
            if (this.rn == this.mg) {
                var qJ = mode.oX;
            } else {
                var qJ = mode.pg;
                this.pR = 1;
            }
            this.tM = qJ.call(mode, this, fa && fa.da);
        }, qX: function (da, offset) {
            this.tM.oa(da, offset);
        }, mE: function () {
            var padding = this.cf.padding;
            if (this.rn == this.mg) {
                padding.gZ(this.gx, this.eG);
                var lf = this.ig(!!'flush');
            } else {
                var lf = this.ig(!!'flush');
                padding.sg(lf);
            }
            return lf;
        }, eG: 128 / 32
    });
    var kv = fK.kv = Base.extend({
        eZ: function (lk) {
            this.nh(lk);
        }, toString: function (mZ) {
            return (mZ || this.mZ).stringify(this);
        }
    });
    var sJ = C.format = {};
    var uR = sJ.uq = {
        stringify: function (lk) {
            var fk = lk.fk;
            var eL = lk.eL;
            if (eL) {
                var fB = fE.create([0x53616c74, 0x65645f5f]).concat(eL).concat(fk);
            } else {
                var fB = fk;
            }
            return fB.toString(lW);
        }, parse: function (ud) {
            var fk = lW.parse(ud);
            var kW = fk.da;
            if (kW[0] == 0x53616c74 && kW[1] == 0x65645f5f) {
                var eL = fE.create(kW.slice(2, 4));
                kW.splice(0, 4);
                fk.fg -= 16;
            }
            return kv.create({fk: fk, eL: eL});
        }
    };
    var iW = fK.iW = Base.extend({
        cf: Base.extend({format: uR}), jX: function (eF, message, key, cf) {
            cf = this.cf.extend(cf);
            var qn = eF.oX(key, cf);
            var fk = qn.gS(message);
            var oE = qn.cf;
            return kv.create({
                fk: fk,
                key: key,
                fa: oE.fa,
                vu: eF,
                mode: oE.mode,
                padding: oE.padding,
                eG: eF.eG,
                mZ: cf.format
            });
        }, jV: function (eF, fk, key, cf) {
            cf = this.cf.extend(cf);
            fk = this.pH(fk, cf.format);
            var plaintext = eF.pg(key, cf).gS(fk.fk || fk);
            return plaintext;
        }, pH: function (fk, format) {
            if (typeof fk == 'string') {
                return format.parse(fk, this);
            } else {
                return fk;
            }
        }
    });
    var rW = C.lX = {};
    var va = rW.uq = {
        rh: function (password, gc, iQ, eL) {
            if (!eL) {
                eL = fE.random(64 / 8);
            }
            var key = qm.create({gc: gc + iQ}).vj(password, eL);
            var fa = fE.create(key.da.slice(gc), iQ * 4);
            key.fg = gc * 4;
            return kv.create({key: key, fa: fa, eL: eL});
        }
    };
    var oU = fK.oU = iW.extend({
        cf: iW.cf.extend({lX: va}), jX: function (eF, message, password, cf) {
            cf = this.cf.extend(cf);
            var jd = cf.lX.rh(password, eF.gc, eF.iQ);
            cf.fa = jd.fa;
            var fk = iW.jX.call(this, eF, message, jd.key, cf);
            fk.nh(jd);
            return fk;
        }, jV: function (eF, fk, password, cf) {
            cf = this.cf.extend(cf);
            fk = this.pH(fk, cf.format);
            var jd = cf.lX.rh(password, eF.gc, eF.iQ, fk.eL);
            cf.fa = jd.fa;
            var plaintext = iW.jV.call(this, eF, fk, jd.key, cf);
            return plaintext;
        }
    });
}());

function J(q, x) {
    this.x = x;
    this.q = q;
};

function bW(other) {
    if (other == this) return true;
    return (this.q.eS(other.q) && this.x.eS(other.x));
};

function dm() {
    return this.x;
};

function cc() {
    return new J(this.q, this.x.fh().cF(this.q));
};

function dj(b) {
    return new J(this.q, this.x.add(b.dK()).cF(this.q));
};

function dQ(b) {
    return new J(this.q, this.x.fA(b.dK()).cF(this.q));
};

function ci(b) {
    return new J(this.q, this.x.multiply(b.dK()).cF(this.q));
};

function cA() {
    return new J(this.q, this.x.square().cF(this.q));
};

function cU(b) {
    return new J(this.q, this.x.multiply(b.dK().hx(this.q)).cF(this.q));
};J.prototype.eS = bW;
J.prototype.dK = dm;
J.prototype.fh = cc;
J.prototype.add = dj;
J.prototype.fA = dQ;
J.prototype.multiply = ci;
J.prototype.square = cA;
J.prototype.divide = cU;

function V(cT, x, y, z) {
    this.cT = cT;
    this.x = x;
    this.y = y;
    if (z == null) {
        this.z = O.ONE;
    } else {
        this.z = z;
    }
    this.iG = null;
};

function di() {
    if (this.iG == null) {
        this.iG = this.z.hx(this.cT.q);
    }
    return this.cT.eJ(this.x.dK().multiply(this.iG).cF(this.cT.q));
};

function cY() {
    if (this.iG == null) {
        this.iG = this.z.hx(this.cT.q);
    }
    return this.cT.eJ(this.y.dK().multiply(this.iG).cF(this.cT.q));
};

function dM(other) {
    if (other == this) return true;
    if (this.fj()) return other.fj();
    if (other.fj()) return this.fj();
    var u, v;
    u = other.y.dK().multiply(this.z).fA(this.y.dK().multiply(other.z)).cF(this.cT.q);
    if (!u.eS(O.ZERO)) return false;
    v = other.x.dK().multiply(this.z).fA(this.x.dK().multiply(other.z)).cF(this.cT.q);
    return v.eS(O.ZERO);
};

function cZ() {
    if ((this.x == null) && (this.y == null)) return true;
    return this.z.eS(O.ZERO) && !this.y.dK().eS(O.ZERO);
};

function dv() {
    return new V(this.cT, this.x, this.y.fh(), this.z);
};

function dh(b) {
    if (this.fj()) return b;
    if (b.fj()) return this;
    var u = b.y.dK().multiply(this.z).fA(this.y.dK().multiply(b.z)).cF(this.cT.q);
    var v = b.x.dK().multiply(this.z).fA(this.x.dK().multiply(b.z)).cF(this.cT.q);
    if (O.ZERO.eS(v)) {
        if (O.ZERO.eS(u)) {
            return this.iI();
        }
        return this.cT.ho();
    }
    var jB = new O("3");
    var x1 = this.x.dK();
    var y1 = this.y.dK();
    var x2 = b.x.dK();
    var y2 = b.y.dK();
    var qx = v.square();
    var ld = qx.multiply(v);
    var re = x1.multiply(qx);
    var qF = u.square().multiply(this.z);
    var hn = qF.fA(re.shiftLeft(1)).multiply(b.z).fA(ld).multiply(v).cF(this.cT.q);
    var hg = re.multiply(jB).multiply(u).fA(y1.multiply(ld)).fA(qF.multiply(u)).multiply(b.z).add(u.multiply(ld)).cF(this.cT.q);
    var mO = ld.multiply(this.z).multiply(b.z).cF(this.cT.q);
    return new V(this.cT, this.cT.eJ(hn), this.cT.eJ(hg), mO);
};

function dg() {
    if (this.fj()) return this;
    if (this.y.dK().eP() == 0) return this.cT.ho();
    var jB = new O("3");
    var x1 = this.x.dK();
    var y1 = this.y.dK();
    var mV = y1.multiply(this.z);
    var mn = mV.multiply(y1).cF(this.cT.q);
    var a = this.cT.a.dK();
    var w = x1.square().multiply(jB);
    if (!O.ZERO.eS(a)) {
        w = w.add(this.z.square().multiply(a));
    }
    w = w.cF(this.cT.q);
    var hn = w.square().fA(x1.shiftLeft(3).multiply(mn)).shiftLeft(1).multiply(mV).cF(this.cT.q);
    var hg = w.multiply(jB).multiply(x1).fA(mn.shiftLeft(1)).shiftLeft(2).multiply(mn).fA(w.square().multiply(w)).cF(this.cT.q);
    var mO = mV.square().multiply(mV).shiftLeft(3).cF(this.cT.q);
    return new V(this.cT, this.cT.eJ(hn), this.cT.eJ(hg), mO);
};

function cG(k) {
    if (this.fj()) return this;
    if (k.eP() == 0) return this.cT.ho();
    var e = k;
    var h = e.multiply(new O("3"));
    var mI = this.fh();
    var R = this;
    var i;
    for (i = h.fl() - 2; i > 0; --i) {
        R = R.iI();
        var iK = h.en(i);
        var oC = e.en(i);
        if (iK != oC) {
            R = R.add(iK ? this : mI);
        }
    }
    return R;
};

function cr(j, x, k) {
    var i;
    if (j.fl() > k.fl()) i = j.fl() - 1; else i = k.fl() - 1;
    var R = this.cT.ho();
    var both = this.add(x);
    while (i >= 0) {
        R = R.iI();
        if (j.en(i)) {
            if (k.en(i)) {
                R = R.add(both);
            } else {
                R = R.add(this);
            }
        } else {
            if (k.en(i)) {
                R = R.add(x);
            }
        }
        --i;
    }
    return R;
};V.prototype.fc = di;
V.prototype.fu = cY;
V.prototype.eS = dM;
V.prototype.fj = cZ;
V.prototype.fh = dv;
V.prototype.add = dh;
V.prototype.iI = dg;
V.prototype.multiply = cG;
V.prototype.wF = cr;

function aG(q, a, b) {
    this.q = q;
    this.a = this.eJ(a);
    this.b = this.eJ(b);
    this.oY = new V(this, null, null);
};

function cJ() {
    return this.q;
};

function dr() {
    return this.a;
};

function cp() {
    return this.b;
};

function bX(other) {
    if (other == this) return true;
    return (this.q.eS(other.q) && this.a.eS(other.a) && this.b.eS(other.b));
};

function dG() {
    return this.oY;
};

function ca(x) {
    return new J(this.q, x);
};

function cu(s) {
    switch (parseInt(s.substr(0, 2), 16)) {
        case 0:
            return this.oY;
        case 2:
        case 3:
            return null;
        case 4:
        case 6:
        case 7:
            var eI = (s.length - 2) / 2;
            var kk = s.substr(2, eI);
            var kA = s.substr(eI + 2, eI);
            return new V(this, this.eJ(new O(kk, 16)), this.eJ(new O(kA, 16)));
        default:
            return null;
    }
};aG.prototype.qK = cJ;
aG.prototype.tw = dr;
aG.prototype.tm = cp;
aG.prototype.eS = bX;
aG.prototype.ho = dG;
aG.prototype.eJ = ca;
aG.prototype.ur = cu;
if (typeof Aostar == "undefined" || !Aostar) Aostar = {};
if (typeof Aostar.crypto == "undefined" || !Aostar.crypto) Aostar.crypto = {};
Aostar.crypto.ef = function (cE) {
    var fG = "secp256r1";
    var ey = null;
    var eh = null;
    var eB = null;
    var lO = new bv();
    var uV = null;
    this.type = "EC";

    function cz(P, k, Q, l) {
        var m = Math.max(k.fl(), l.fl());
        var Z = P.gg(Q);
        var R = P.cT.ho();
        for (var i = m - 1; i >= 0; --i) {
            R = R.oy();
            R.z = O.ONE;
            if (k.en(i)) {
                if (l.en(i)) {
                    R = R.gg(Z);
                } else {
                    R = R.gg(P);
                }
            } else {
                if (l.en(i)) {
                    R = R.gg(Q);
                }
            }
        }
        return R;
    };this.jk = function (iE) {
        return new O(iE.fl(), lO).cF(iE.fA(O.ONE)).add(O.ONE);
    };
    this.mX = function (fG) {
        this.ey = Aostar.crypto.es.getByName(fG);
        this.eh = null;
        this.eB = null;
        this.fG = fG;
    };
    this.iO = function (eh) {
        this.qP = true;
        this.eh = eh;
    };
    this.jq = function (eB) {
        this.qy = true;
        this.eB = eB;
    };
    this.wu = function () {
        var h = this.eB;
        if (h.substr(0, 2) !== "04") throw "this method supports uncompressed format(04) only";
        var gO = this.ey.hU / 4;
        if (h.length !== 2 + gO * 2) throw "malformed public key cn length";
        var result = {};
        result.x = h.substr(2, gO);
        result.y = h.substr(2 + gO);
        return result;
    };
    this.wO = function () {
        var s = this.fG;
        if (s === "secp256r1" || s === "NIST P-256" || s === "P-256" || s === "prime256v1") return "P-256";
        if (s === "secp384r1" || s === "NIST P-384" || s === "P-384") return "P-384";
        return null;
    };
    this.mT = function () {
        var mF = this.ey['n'];
        var kN = this.jk(mF);
        var kq = this.ey['G'].multiply(kN);
        var mU = kq.fc().dK();
        var mq = kq.fu().dK();
        var gO = this.ey['hU'] / 4;
        var hQ = ("0000000000" + kN.toString(16)).slice(-gO);
        var nX = ("0000000000" + mU.toString(16)).slice(-gO);
        var pl = ("0000000000" + mq.toString(16)).slice(-gO);
        var iy = "04" + nX + pl;
        this.iO(hQ);
        this.jq(iy);
        return {'ecprvhex': hQ, 'ecpubhex': iy};
    };
    this.kC = function (fN) {
        return this.iY(fN, this.eh);
    };
    this.iY = function (fN, oG) {
        var d = new O(oG, 16);
        var n = this.ey['n'];
        var e = new O(fN, 16);
        do {
            var k = this.jk(n);
            var G = this.ey['G'];
            var Q = G.multiply(k);
            var r = Q.fc().dK().cF(n);
        } while (r.cS(O.ZERO) <= 0);
        var s = k.hx(n).multiply(e.add(d.multiply(r))).cF(n);
        return Aostar.crypto.ef.nq(r, s);
    };
    this.gq = function (hash, nL) {
        var d = nL;
        var n = this.ey['n'];
        var e = O.gP(hash);
        do {
            var k = this.jk(n);
            var G = this.ey['G'];
            var Q = G.multiply(k);
            var r = Q.fc().dK().cF(n);
        } while (r.cS(O.ZERO) <= 0);
        var s = k.hx(n).multiply(e.add(d.multiply(r))).cF(n);
        return this.lD(r, s);
    };
    this.lc = function (fN, eR) {
        return this.kG(fN, eR, this.eB);
    };
    this.kG = function (fN, eR, eA) {
        var r, s;
        var eU = Aostar.crypto.ef.nK(eR);
        r = eU.r;
        s = eU.s;
        var Q;
        Q = V.kE(this.ey['cT'], eA);
        var e = new O(fN, 16);
        return this.jZ(e, r, s, Q);
    };
    this.iP = function (hash, dz, hf) {
        var r, s;
        if (mh.dV.isArray(dz)) {
            var eU = this.nu(dz);
            r = eU.r;
            s = eU.s;
        } else if ("object" === typeof dz && dz.r && dz.s) {
            r = dz.r;
            s = dz.s;
        } else {
            throw "Invalid value for signature";
        }
        var Q;
        if (hf instanceof V) {
            Q = hf;
        } else if (mh.dV.isArray(hf)) {
            Q = V.qB(this.ey['cT'], hf);
        } else {
            throw "Invalid format for hf value, must be byte array lu V";
        }
        var e = O.gP(hash);
        return this.jZ(e, r, s, Q);
    };
    this.jZ = function (e, r, s, Q) {
        var n = this.ey['n'];
        var G = this.ey['G'];
        if (r.cS(O.ONE) < 0 || r.cS(n) >= 0) return false;
        if (s.cS(O.ONE) < 0 || s.cS(n) >= 0) return false;
        var c = s.hx(n);
        var sb = e.multiply(c).cF(n);
        var sL = r.multiply(c).cF(n);
        var lZ = G.multiply(sb).add(Q.multiply(sL));
        var v = lZ.fc().dK().cF(n);
        return v.eS(r);
    };
    this.lD = function (r, s) {
        var hd = r.lY();
        var gi = s.lY();
        var eC = [];
        eC.push(0x02);
        eC.push(hd.length);
        eC = eC.concat(hd);
        eC.push(0x02);
        eC.push(gi.length);
        eC = eC.concat(gi);
        eC.unshift(eC.length);
        eC.unshift(0x30);
        return eC;
    };
    this.nu = function (dz) {
        var cursor;
        if (dz[0] != 0x30) throw new Error("gn not a valid jA");
        cursor = 2;
        if (dz[cursor] != 0x02) throw new Error("First element in signature must be a gv");
        ;var hd = dz.slice(cursor + 2, cursor + 2 + dz[cursor + 1]);
        cursor += 2 + dz[cursor + 1];
        if (dz[cursor] != 0x02) throw new Error("Second element in signature must be a gv");
        var gi = dz.slice(cursor + 2, cursor + 2 + dz[cursor + 1]);
        cursor += 2 + dz[cursor + 1];
        var r = O.gP(hd);
        var s = O.gP(gi);
        return {r: r, s: s};
    };
    this.uz = function (dz) {
        if (dz.length !== 65) {
            throw "gn has the wrong length";
        }
        var i = dz[0] - 27;
        if (i < 0 || i > 7) {
            throw "Invalid signature type";
        }
        var n = this.ey['n'];
        var r = O.gP(dz.slice(1, 33)).cF(n);
        var s = O.gP(dz.slice(33, 65)).cF(n);
        return {r: r, s: s, i: i};
    };
    if (cE !== undefined) {
        if (cE['cT'] !== undefined) {
            this.fG = cE['cT'];
        }
    }
    if (this.fG === undefined) this.fG = fG;
    this.mX(this.fG);
    if (cE !== undefined) {
        if (cE['prv'] !== undefined) this.iO(cE['prv']);
        if (cE['pub'] !== undefined) this.jq(cE['pub']);
    }
};
Aostar.crypto.ef.nK = function (eR) {
    var p = Aostar.crypto.ef.oH(eR);
    var jK = new O(p.r, 16);
    var hZ = new O(p.s, 16);
    return {'r': jK, 's': hZ};
};
Aostar.crypto.ef.oH = function (eR) {
    if (eR.substr(0, 2) != "30") throw "signature is not a ASN.1 eC";
    var a = cB.hj(eR, 0);
    if (a.length != 2) throw "number of signature ASN.1 eC elements seem wrong";
    var qk = a[0];
    var pI = a[1];
    if (eR.substr(qk, 2) != "02") throw "1st item of sequene of signature is not ASN.1 integer";
    if (eR.substr(pI, 2) != "02") throw "2nd item of sequene of signature is not ASN.1 integer";
    var hR = cB.eo(eR, qk);
    var fm = cB.eo(eR, pI);
    return {'r': hR, 's': fm};
};
Aostar.crypto.ef.wv = function (tL) {
    var nz = Aostar.crypto.ef.oH(tL);
    var hR = nz.r;
    var fm = nz.s;
    if (hR.substr(0, 2) == "00" && (((hR.length / 2) * 8) % (16 * 8)) == 8) hR = hR.substr(2);
    if (fm.substr(0, 2) == "00" && (((fm.length / 2) * 8) % (16 * 8)) == 8) fm = fm.substr(2);
    if ((((hR.length / 2) * 8) % (16 * 8)) != 0) throw "unknown ef dz r length error";
    if ((((fm.length / 2) * 8) % (16 * 8)) != 0) throw "unknown ef dz s length error";
    return hR + fm;
};
Aostar.crypto.ef.wV = function (jS) {
    if ((((jS.length / 2) * 8) % (16 * 8)) != 0) throw "unknown ef concatinated r-s dz  length error";
    var hR = jS.substr(0, jS.length / 2);
    var fm = jS.substr(jS.length / 2);
    return Aostar.crypto.ef.sn(hR, fm);
};
Aostar.crypto.ef.sn = function (hR, fm) {
    var jK = new O(hR, 16);
    var hZ = new O(fm, 16);
    return Aostar.crypto.ef.nq(jK, hZ);
};
Aostar.crypto.ef.nq = function (jK, hZ) {
    var sG = new Aostar.df.gv({'jR': jK});
    var sx = new Aostar.df.gv({'jR': hZ});
    var tj = new Aostar.df.jA({'array': [sG, sx]});
    return tj.ew();
};
J.prototype.wk = function () {
    return Math.floor((this.dK().fl() + 7) / 8);
};
V.prototype.xa = function (sC) {
    var pP = function (i, eI) {
        var gI = i.wc();
        if (eI < gI.length) {
            gI = gI.slice(gI.length - eI);
        } else while (eI > gI.length) {
            gI.unshift(0);
        }
        return gI;
    };
    var x = this.fc().dK();
    var y = this.fu().dK();
    var el = pP(x, 32);
    if (sC) {
        if (y.eQ()) {
            el.unshift(0x02);
        } else {
            el.unshift(0x03);
        }
    } else {
        el.unshift(0x04);
        el = el.concat(pP(y, 32));
    }
    return el;
};
V.qB = function (cT, el) {
    var type = el[0];
    var ht = el.length - 1;
    var qp = el.slice(1, 1 + ht / 2);
    var nM = el.slice(1 + ht / 2, 1 + ht);
    qp.unshift(0);
    nM.unshift(0);
    var x = new O(qp);
    var y = new O(nM);
    return new V(cT, cT.eJ(x), cT.eJ(y));
};
V.kE = function (cT, jU) {
    var type = jU.substr(0, 2);
    var ht = jU.length - 2;
    var kk = jU.substr(2, ht / 2);
    var kA = jU.substr(2 + ht / 2, ht / 2);
    var x = new O(kk, 16);
    var y = new O(kA, 16);
    return new V(cT, cT.eJ(x), cT.eJ(y));
};
V.prototype.gg = function (b) {
    if (this.fj()) return b;
    if (b.fj()) return this;
    if (this.x.eS(b.x)) {
        if (this.y.eS(b.y)) {
            return this.iI();
        }
        return this.cT.ho();
    }
    var rA = b.x.fA(this.x);
    var qM = b.y.fA(this.y);
    var iA = qM.divide(rA);
    var hn = iA.square().fA(this.x).fA(b.x);
    var hg = iA.multiply(this.x.fA(hn)).fA(this.y);
    return new V(this.cT, hn, hg);
};
V.prototype.oy = function () {
    if (this.fj()) return this;
    if (this.y.dK().eP() == 0) {
        return this.cT.ho();
    }
    var oh = this.cT.eJ(O.valueOf(2));
    var jB = this.cT.eJ(O.valueOf(3));
    var iA = this.x.square().multiply(jB).add(this.cT.a).divide(this.y.multiply(oh));
    var hn = iA.square().fA(this.x.multiply(oh));
    var hg = iA.multiply(this.x.fA(hn)).fA(this.y);
    return new V(this.cT, hn, hg);
};
V.prototype.wX = function (k) {
    if (this.fj()) return this;
    if (k.eP() == 0) return this.cT.ho();
    var e = k;
    var h = e.multiply(new O("3"));
    var mI = this.fh();
    var R = this;
    var i;
    for (i = h.fl() - 2; i > 0; --i) {
        R = R.iI();
        var iK = h.en(i);
        var oC = e.en(i);
        if (iK != oC) {
            R = R.gg(iK ? this : mI);
        }
    }
    return R;
};
V.prototype.tP = function () {
    var x = this.fc().dK();
    var y = this.fu().dK();
    var a = this.cT.tw().dK();
    var b = this.cT.tm().dK();
    var n = this.cT.qK();
    var lhs = y.multiply(y).cF(n);
    var rhs = x.multiply(x).multiply(x).add(a.multiply(x)).add(b).cF(n);
    return lhs.eS(rhs);
};
V.prototype.toString = function () {
    return '(' + this.fc().dK().toString() + ',' + this.fu().dK().toString() + ')';
};
V.prototype.wf = function () {
    var n = this.cT.qK();
    if (this.fj()) {
        throw new Error("Point is at oY.");
    }
    var x = this.fc().dK();
    var y = this.fu().dK();
    if (x.cS(O.ONE) < 0 || x.cS(n.fA(O.ONE)) > 0) {
        throw new Error('x coordinate out of bounds');
    }
    if (y.cS(O.ONE) < 0 || y.cS(n.fA(O.ONE)) > 0) {
        throw new Error('y coordinate out of bounds');
    }
    if (!this.tP()) {
        throw new Error("Point is not on the cT.");
    }
    if (this.multiply(n).fj()) {
        throw new Error("Point is not a scalar multiple of G.");
    }
    return true;
};
var gK;
var tc = 0xdeadbeefcafe;
var qZ = ((tc & 0xffffff) == 0xefcafe);

function O(a, b, c) {
    if (a != null) if ("number" == typeof a) this.kn(a, b, c); else if (b == null && "string" != typeof a) this.nc(a, 256); else this.nc(a, b);
};

function K() {
    return new O(null);
};

function bZ(i, x, w, j, c, n) {
    while (--n >= 0) {
        var v = x * this[i++] + w[j] + c;
        c = Math.floor(v / 0x4000000);
        w[j++] = v & 0x3ffffff;
    }
    return c;
};

function dn(i, x, w, j, c, n) {
    var ly = x & 0x7fff, lq = x >> 15;
    while (--n >= 0) {
        var l = this[i] & 0x7fff;
        var h = this[i++] >> 15;
        var m = lq * l + h * ly;
        l = ly * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);
        c = (l >>> 30) + (m >>> 15) + lq * h + (c >>> 30);
        w[j++] = l & 0x3fffffff;
    }
    return c;
};

function ck(i, x, w, j, c, n) {
    var ly = x & 0x3fff, lq = x >> 14;
    while (--n >= 0) {
        var l = this[i] & 0x3fff;
        var h = this[i++] >> 14;
        var m = lq * l + h * ly;
        l = ly * l + ((m & 0x3fff) << 14) + w[j] + c;
        c = (l >> 28) + (m >> 14) + lq * h;
        w[j++] = l & 0xfffffff;
    }
    return c;
};var qq = typeof navigator !== "undefined";
if (qq && qZ && (navigator.appName == "Microsoft Internet Explorer")) {
    O.prototype.dX = dn;
    gK = 30;
} else if (qq && qZ && (navigator.appName != "Netscape")) {
    O.prototype.dX = bZ;
    gK = 26;
} else {
    O.prototype.dX = ck;
    gK = 28;
}
O.prototype.dE = gK;
O.prototype.fi = ((1 << gK) - 1);
O.prototype.ft = (1 << gK);
var mx = 52;
O.prototype.ty = Math.pow(2, mx);
O.prototype.nP = mx - gK;
O.prototype.nN = 2 * gK - mx;
var uK = "0123456789abcdefghijklmnopqrstuvwxyz";
var ky = new Array();
var iz, ek;
iz = "0".charCodeAt(0);
for (ek = 0; ek <= 9; ++ek) ky[iz++] = ek;
iz = "a".charCodeAt(0);
for (ek = 10; ek < 36; ++ek) ky[iz++] = ek;
iz = "A".charCodeAt(0);
for (ek = 10; ek < 36; ++ek) ky[iz++] = ek;

function av(n) {
    return uK.charAt(n);
};

function aA(s, i) {
    var c = ky[s.charCodeAt(i)];
    return (c == null) ? -1 : c;
};

function dw(r) {
    for (var i = this.t - 1; i >= 0; --i) r[i] = this[i];
    r.t = this.t;
    r.s = this.s;
};

function cd(x) {
    this.t = 1;
    this.s = (x < 0) ? -1 : 0;
    if (x > 0) this[0] = x; else if (x < -1) this[0] = x + this.ft; else this.t = 0;
};

function ap(i) {
    var r = K();
    r.hH(i);
    return r;
};

function dp(s, b) {
    var k;
    if (b == 16) k = 4; else if (b == 8) k = 3; else if (b == 256) k = 8; else if (b == 2) k = 1; else if (b == 32) k = 5; else if (b == 4) k = 2; else {
        this.pd(s, b);
        return;
    }
    this.t = 0;
    this.s = 0;
    var i = s.length, gG = false, dY = 0;
    while (--i >= 0) {
        var x = (k == 8) ? s[i] & 0xff : aA(s, i);
        if (x < 0) {
            if (s.charAt(i) == "-") gG = true;
            continue;
        }
        gG = false;
        if (dY == 0) this[this.t++] = x; else if (dY + k > this.dE) {
            this[this.t - 1] |= (x & ((1 << (this.dE - dY)) - 1)) << dY;
            this[this.t++] = (x >> (this.dE - dY));
        } else this[this.t - 1] |= x << dY;
        dY += k;
        if (dY >= this.dE) dY -= this.dE;
    }
    if (k == 8 && (s[0] & 0x80) != 0) {
        this.s = -1;
        if (dY > 0) this[this.t - 1] |= ((1 << (this.dE - dY)) - 1) << dY;
    }
    this.fz();
    if (gG) O.ZERO.dF(this, this);
};

function du() {
    var c = this.s & this.fi;
    while (this.t > 0 && this[this.t - 1] == c) --this.t;
};

function cI(b) {
    if (this.s < 0) return "-" + this.fh().toString(b);
    var k;
    if (b == 16) k = 4; else if (b == 8) k = 3; else if (b == 2) k = 1; else if (b == 32) k = 5; else if (b == 4) k = 2; else return this.eE(b);
    var gH = (1 << k) - 1, d, m = false, r = "", i = this.t;
    var p = this.dE - (i * this.dE) % k;
    if (i-- > 0) {
        if (p < this.dE && (d = this[i] >> p) > 0) {
            m = true;
            r = av(d);
        }
        while (i >= 0) {
            if (p < k) {
                d = (this[i] & ((1 << p) - 1)) << (k - p);
                d |= this[--i] >> (p += this.dE - k);
            } else {
                d = (this[i] >> (p -= k)) & gH;
                if (p <= 0) {
                    p += this.dE;
                    --i;
                }
            }
            if (d > 0) m = true;
            if (m) r += av(d);
        }
    }
    return m ? r : "0";
};

function cL() {
    var r = K();
    O.ZERO.dF(this, r);
    return r;
};

function cw() {
    return (this.s < 0) ? this.fh() : this;
};

function ak(a) {
    var r = this.s - a.s;
    if (r != 0) return r;
    var i = this.t;
    r = i - a.t;
    if (r != 0) return (this.s < 0) ? -r : r;
    while (--i >= 0) if ((r = this[i] - a[i]) != 0) return r;
    return 0;
};

function aL(x) {
    var r = 1, t;
    if ((t = x >>> 16) != 0) {
        x = t;
        r += 16;
    }
    if ((t = x >> 8) != 0) {
        x = t;
        r += 8;
    }
    if ((t = x >> 4) != 0) {
        x = t;
        r += 4;
    }
    if ((t = x >> 2) != 0) {
        x = t;
        r += 2;
    }
    if ((t = x >> 1) != 0) {
        x = t;
        r += 1;
    }
    return r;
};

function cv() {
    if (this.t <= 0) return 0;
    return this.dE * (this.t - 1) + aL(this[this.t - 1] ^ (this.s & this.fi));
};

function cb(n, r) {
    var i;
    for (i = this.t - 1; i >= 0; --i) r[i + n] = this[i];
    for (i = n - 1; i >= 0; --i) r[i] = 0;
    r.t = this.t + n;
    r.s = this.s;
};

function dk(n, r) {
    for (var i = n; i < this.t; ++i) r[i - n] = this[i];
    r.t = Math.max(this.t - n, 0);
    r.s = this.s;
};

function dA(n, r) {
    var eN = n % this.dE;
    var kz = this.dE - eN;
    var ll = (1 << kz) - 1;
    var dW = Math.floor(n / this.dE), c = (this.s << eN) & this.fi, i;
    for (i = this.t - 1; i >= 0; --i) {
        r[i + dW + 1] = (this[i] >> kz) | c;
        c = (this[i] & ll) << eN;
    }
    for (i = dW - 1; i >= 0; --i) r[i] = 0;
    r[dW] = c;
    r.t = this.t + dW + 1;
    r.s = this.s;
    r.fz();
};

function cK(n, r) {
    r.s = this.s;
    var dW = Math.floor(n / this.dE);
    if (dW >= this.t) {
        r.t = 0;
        return;
    }
    var eN = n % this.dE;
    var kz = this.dE - eN;
    var ll = (1 << eN) - 1;
    r[0] = this[dW] >> eN;
    for (var i = dW + 1; i < this.t; ++i) {
        r[i - dW - 1] |= (this[i] & ll) << kz;
        r[i - dW] = this[i] >> eN;
    }
    if (eN > 0) r[this.t - dW - 1] |= (this.s & ll) << kz;
    r.t = this.t - dW;
    r.fz();
};

function cl(a, r) {
    var i = 0, c = 0, m = Math.min(a.t, this.t);
    while (i < m) {
        c += this[i] - a[i];
        r[i++] = c & this.fi;
        c >>= this.dE;
    }
    if (a.t < this.t) {
        c -= a.s;
        while (i < this.t) {
            c += this[i];
            r[i++] = c & this.fi;
            c >>= this.dE;
        }
        c += this.s;
    } else {
        c += this.s;
        while (i < a.t) {
            c -= a[i];
            r[i++] = c & this.fi;
            c >>= this.dE;
        }
        c -= a.s;
    }
    r.s = (c < 0) ? -1 : 0;
    if (c < -1) r[i++] = this.ft + c; else if (c > 0) r[i++] = c;
    r.t = i;
    r.fz();
};

function cR(a, r) {
    var x = this.abs(), y = a.abs();
    var i = x.t;
    r.t = i + y.t;
    while (--i >= 0) r[i] = 0;
    for (i = 0; i < y.t; ++i) r[i + x.t] = x.dX(0, y[i], r, i, 0, x.t);
    r.s = 0;
    r.fz();
    if (this.s != a.s) O.ZERO.dF(r, r);
};

function cQ(r) {
    var x = this.abs();
    var i = r.t = 2 * x.t;
    while (--i >= 0) r[i] = 0;
    for (i = 0; i < x.t - 1; ++i) {
        var c = x.dX(i, x[i], r, 2 * i, 0, 1);
        if ((r[i + x.t] += x.dX(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.ft) {
            r[i + x.t] -= x.ft;
            r[i + x.t + 1] = 1;
        }
    }
    if (r.t > 0) r[r.t - 1] += x.dX(i, x[i], r, 2 * i, 0, 1);
    r.s = 0;
    r.fz();
};

function dI(m, q, r) {
    var hK = m.abs();
    if (hK.t <= 0) return;
    var pt = this.abs();
    if (pt.t < hK.t) {
        if (q != null) q.hH(0);
        if (r != null) this.hw(r);
        return;
    }
    if (r == null) r = K();
    var y = K(), nR = this.s, ms = m.s;
    var ju = this.dE - aL(hK[hK.t - 1]);
    if (ju > 0) {
        hK.fU(ju, y);
        pt.fU(ju, r);
    } else {
        hK.hw(y);
        pt.hw(r);
    }
    var gr = y.t;
    var mt = y[gr - 1];
    if (mt == 0) return;
    var nC = mt * (1 << this.nP) + ((gr > 1) ? y[gr - 2] >> this.nN : 0);
    var uU = this.ty / nC, vc = (1 << this.nP) / nC, e = 1 << this.nN;
    var i = r.t, j = i - gr, t = (q == null) ? K() : q;
    y.jf(j, t);
    if (r.cS(t) >= 0) {
        r[r.t++] = 1;
        r.dF(t, r);
    }
    O.ONE.jf(gr, t);
    t.dF(y, y);
    while (y.t < gr) y[y.t++] = 0;
    while (--j >= 0) {
        var lC = (r[--i] == mt) ? this.fi : Math.floor(r[i] * uU + (r[i - 1] + e) * vc);
        if ((r[i] += y.dX(0, lC, r, j, 0, gr)) < lC) {
            y.jf(j, t);
            r.dF(t, r);
            while (r[i] < --lC) r.dF(t, r);
        }
    }
    if (q != null) {
        r.io(gr, q);
        if (nR != ms) O.ZERO.dF(q, q);
    }
    r.t = gr;
    r.fz();
    if (ju > 0) r.ej(ju, r);
    if (nR < 0) O.ZERO.dF(r, r);
};

function cV(a) {
    var r = K();
    this.abs().fw(a, null, r);
    if (this.s < 0 && r.cS(O.ZERO) > 0) a.dF(r, r);
    return r;
};

function bI(m) {
    this.m = m;
};

function dc(x) {
    if (x.s < 0 || x.cS(this.m) >= 0) return x.cF(this.m); else return x;
};

function cN(x) {
    return x;
};

function dB(x) {
    x.fw(this.m, null, x);
};

function cO(x, y, r) {
    x.hG(y, r);
    this.reduce(r);
};

function co(x, r) {
    x.gs(r);
    this.reduce(r);
};bI.prototype.convert = dc;
bI.prototype.revert = cN;
bI.prototype.reduce = dB;
bI.prototype.fR = cO;
bI.prototype.fv = co;

function cX() {
    if (this.t < 1) return 0;
    var x = this[0];
    if ((x & 1) == 0) return 0;
    var y = x & 3;
    y = (y * (2 - (x & 0xf) * y)) & 0xf;
    y = (y * (2 - (x & 0xff) * y)) & 0xff;
    y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff;
    y = (y * (2 - x * y % this.ft)) % this.ft;
    return (y > 0) ? this.ft - y : -y;
};

function aV(m) {
    this.m = m;
    this.qU = m.uY();
    this.qG = this.qU & 0x7fff;
    this.us = this.qU >> 15;
    this.sa = (1 << (m.dE - 15)) - 1;
    this.uW = 2 * m.t;
};

function bF(x) {
    var r = K();
    x.abs().jf(this.m.t, r);
    r.fw(this.m, null, r);
    if (x.s < 0 && r.cS(O.ZERO) > 0) this.m.dF(r, r);
    return r;
};

function bH(x) {
    var r = K();
    x.hw(r);
    this.reduce(r);
    return r;
};

function de(x) {
    while (x.t <= this.uW) x[x.t++] = 0;
    for (var i = 0; i < this.m.t; ++i) {
        var j = x[i] & 0x7fff;
        var sm = (j * this.qG + (((j * this.us + (x[i] >> 15) * this.qG) & this.sa) << 15)) & x.fi;
        j = i + this.m.t;
        x[j] += this.m.dX(0, sm, x, i, 0, this.m.t);
        while (x[j] >= x.ft) {
            x[j] -= x.ft;
            x[++j]++;
        }
    }
    x.fz();
    x.io(this.m.t, x);
    if (x.cS(this.m) >= 0) x.dF(this.m, x);
};

function bo(x, r) {
    x.gs(r);
    this.reduce(r);
};

function dH(x, y, r) {
    x.hG(y, r);
    this.reduce(r);
};aV.prototype.convert = bF;
aV.prototype.revert = bH;
aV.prototype.reduce = de;
aV.prototype.fR = dH;
aV.prototype.fv = bo;

function cC() {
    return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;
};

function cW(e, z) {
    if (e > 0xffffffff || e < 1) return O.ONE;
    var r = K(), r2 = K(), g = z.convert(this), i = aL(e) - 1;
    g.hw(r);
    while (--i >= 0) {
        z.fv(r, r2);
        if ((e & (1 << i)) > 0) z.fR(r2, g, r); else {
            var t = r;
            r = r2;
            r2 = t;
        }
    }
    return z.revert(r);
};

function dN(e, m) {
    var z;
    if (e < 256 || m.eQ()) z = new bI(m); else z = new aV(m);
    return this.exp(e, z);
};O.prototype.hw = dw;
O.prototype.hH = cd;
O.prototype.nc = dp;
O.prototype.fz = du;
O.prototype.jf = cb;
O.prototype.io = dk;
O.prototype.fU = dA;
O.prototype.ej = cK;
O.prototype.dF = cl;
O.prototype.hG = cR;
O.prototype.gs = cQ;
O.prototype.fw = dI;
O.prototype.uY = cX;
O.prototype.eQ = cC;
O.prototype.exp = cW;
O.prototype.toString = cI;
O.prototype.fh = cL;
O.prototype.abs = cw;
O.prototype.cS = ak;
O.prototype.fl = cv;
O.prototype.cF = cV;
O.prototype.pE = dN;
O.ZERO = ap(0);
O.ONE = ap(1);

function bC() {
    var r = K();
    this.hw(r);
    return r;
};

function aZ() {
    if (this.s < 0) {
        if (this.t == 1) return this[0] - this.ft; else if (this.t == 0) return -1;
    } else if (this.t == 1) return this[0]; else if (this.t == 0) return 0;
    return ((this[1] & ((1 << (32 - this.dE)) - 1)) << this.dE) | this[0];
};

function bE() {
    return (this.t == 0) ? this.s : (this[0] << 24) >> 24;
};

function aQ() {
    return (this.t == 0) ? this.s : (this[0] << 16) >> 16;
};

function bU(r) {
    return Math.floor(Math.LN2 * this.dE / Math.log(r));
};

function aN() {
    if (this.s < 0) return -1; else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; else return 1;
};

function be(b) {
    if (b == null) b = 10;
    if (this.eP() == 0 || b < 2 || b > 36) return "0";
    var gm = this.lA(b);
    var a = Math.pow(b, gm);
    var d = ap(a), y = K(), z = K(), r = "";
    this.fw(d, y, z);
    while (y.eP() > 0) {
        r = (a + z.gD()).toString(b).substr(1) + r;
        y.fw(d, y, z);
    }
    return z.gD().toString(b) + r;
};

function aw(s, b) {
    this.hH(0);
    if (b == null) b = 10;
    var gm = this.lA(b);
    var d = Math.pow(b, gm), gG = false, j = 0, w = 0;
    for (var i = 0; i < s.length; ++i) {
        var x = aA(s, i);
        if (x < 0) {
            if (s.charAt(i) == "-" && this.eP() == 0) gG = true;
            continue;
        }
        w = b * w + x;
        if (++j >= gm) {
            this.jN(d);
            this.hb(w, 0);
            j = 0;
            w = 0;
        }
    }
    if (j > 0) {
        this.jN(Math.pow(b, j));
        this.hb(w, 0);
    }
    if (gG) O.ZERO.dF(this, this);
};

function bV(a, b, c) {
    if ("number" == typeof b) {
        if (a < 2) this.hH(1); else {
            this.kn(a, c);
            if (!this.en(a - 1)) this.fH(O.ONE.shiftLeft(a - 1), az, this);
            if (this.eQ()) this.hb(1, 0);
            while (!this.me(b)) {
                this.hb(2, 0);
                if (this.fl() > a) this.dF(O.ONE.shiftLeft(a - 1), this);
            }
        }
    } else {
        var x = new Array(), t = a & 7;
        x.length = (a >> 3) + 1;
        b.ma(x);
        if (t > 0) x[0] &= ((1 << t) - 1); else x[0] = 0;
        this.nc(x, 256);
    }
};

function bO() {
    var i = this.t, r = new Array();
    r[0] = this.s;
    var p = this.dE - (i * this.dE) % 8, d, k = 0;
    if (i-- > 0) {
        if (p < this.dE && (d = this[i] >> p) != (this.s & this.fi) >> p) r[k++] = d | (this.s << (this.dE - p));
        while (i >= 0) {
            if (p < 8) {
                d = (this[i] & ((1 << p) - 1)) << (8 - p);
                d |= this[--i] >> (p += this.dE - 8);
            } else {
                d = (this[i] >> (p -= 8)) & 0xff;
                if (p <= 0) {
                    p += this.dE;
                    --i;
                }
            }
            if ((d & 0x80) != 0) d |= -256;
            if (k == 0 && (this.s & 0x80) != (d & 0x80)) ++k;
            if (k > 0 || d != this.s) r[k++] = d;
        }
    }
    return r;
};

function ab(a) {
    return (this.cS(a) == 0);
};

function aJ(a) {
    return (this.cS(a) < 0) ? this : a;
};

function an(a) {
    return (this.cS(a) > 0) ? this : a;
};

function aW(a, ez, r) {
    var i, f, m = Math.min(a.t, this.t);
    for (i = 0; i < m; ++i) r[i] = ez(this[i], a[i]);
    if (a.t < this.t) {
        f = a.s & this.fi;
        for (i = m; i < this.t; ++i) r[i] = ez(this[i], f);
        r.t = this.t;
    } else {
        f = this.s & this.fi;
        for (i = m; i < a.t; ++i) r[i] = ez(f, a[i]);
        r.t = a.t;
    }
    r.s = ez(this.s, a.s);
    r.fz();
};

function bM(x, y) {
    return x & y;
};

function bq(a) {
    var r = K();
    this.fH(a, bM, r);
    return r;
};

function az(x, y) {
    return x | y;
};

function bp(a) {
    var r = K();
    this.fH(a, az, r);
    return r;
};

function bu(x, y) {
    return x ^ y;
};

function bJ(a) {
    var r = K();
    this.fH(a, bu, r);
    return r;
};

function aB(x, y) {
    return x & ~y;
};

function ao(a) {
    var r = K();
    this.fH(a, aB, r);
    return r;
};

function aR() {
    var r = K();
    for (var i = 0; i < this.t; ++i) r[i] = this.fi & ~this[i];
    r.t = this.t;
    r.s = ~this.s;
    return r;
};

function aF(n) {
    var r = K();
    if (n < 0) this.ej(-n, r); else this.fU(n, r);
    return r;
};

function ag(n) {
    var r = K();
    if (n < 0) this.fU(-n, r); else this.ej(n, r);
    return r;
};

function bP(x) {
    if (x == 0) return -1;
    var r = 0;
    if ((x & 0xffff) == 0) {
        x >>= 16;
        r += 16;
    }
    if ((x & 0xff) == 0) {
        x >>= 8;
        r += 8;
    }
    if ((x & 0xf) == 0) {
        x >>= 4;
        r += 4;
    }
    if ((x & 3) == 0) {
        x >>= 2;
        r += 2;
    }
    if ((x & 1) == 0) ++r;
    return r;
};

function bG() {
    for (var i = 0; i < this.t; ++i) if (this[i] != 0) return i * this.dE + bP(this[i]);
    if (this.s < 0) return this.t * this.dE;
    return -1;
};

function aC(x) {
    var r = 0;
    while (x != 0) {
        x &= x - 1;
        ++r;
    }
    return r;
};

function bf() {
    var r = 0, x = this.s & this.fi;
    for (var i = 0; i < this.t; ++i) r += aC(this[i] ^ x);
    return r;
};

function bw(n) {
    var j = Math.floor(n / this.dE);
    if (j >= this.t) return (this.s != 0);
    return ((this[j] & (1 << (n % this.dE))) != 0);
};

function aq(n, ez) {
    var r = O.ONE.shiftLeft(n);
    this.fH(r, ez, r);
    return r;
};

function aY(n) {
    return this.ix(n, az);
};

function bj(n) {
    return this.ix(n, aB);
};

function bb(n) {
    return this.ix(n, bu);
};

function aO(a, r) {
    var i = 0, c = 0, m = Math.min(a.t, this.t);
    while (i < m) {
        c += this[i] + a[i];
        r[i++] = c & this.fi;
        c >>= this.dE;
    }
    if (a.t < this.t) {
        c += a.s;
        while (i < this.t) {
            c += this[i];
            r[i++] = c & this.fi;
            c >>= this.dE;
        }
        c += this.s;
    } else {
        c += this.s;
        while (i < a.t) {
            c += a[i];
            r[i++] = c & this.fi;
            c >>= this.dE;
        }
        c += a.s;
    }
    r.s = (c < 0) ? -1 : 0;
    if (c > 0) r[i++] = c; else if (c < -1) r[i++] = this.ft + c;
    r.t = i;
    r.fz();
};

function ax(a) {
    var r = K();
    this.gQ(a, r);
    return r;
};

function aS(a) {
    var r = K();
    this.dF(a, r);
    return r;
};

function bh(a) {
    var r = K();
    this.hG(a, r);
    return r;
};

function as() {
    var r = K();
    this.gs(r);
    return r;
};

function aa(a) {
    var r = K();
    this.fw(a, r, null);
    return r;
};

function aI(a) {
    var r = K();
    this.fw(a, null, r);
    return r;
};

function aX(a) {
    var q = K(), r = K();
    this.fw(a, q, r);
    return new Array(q, r);
};

function aE(n) {
    this[this.t] = this.dX(0, n - 1, this, 0, 0, this.t);
    ++this.t;
    this.fz();
};

function bn(n, w) {
    if (n == 0) return;
    while (this.t <= w) this[this.t++] = 0;
    this[w] += n;
    while (this[w] >= this.ft) {
        this[w] -= this.ft;
        if (++w >= this.t) this[this.t++] = 0;
        ++this[w];
    }
};

function ae() {
};

function bL(x) {
    return x;
};

function ar(x, y, r) {
    x.hG(y, r);
};

function bk(x, r) {
    x.gs(r);
};ae.prototype.convert = bL;
ae.prototype.revert = bL;
ae.prototype.fR = ar;
ae.prototype.fv = bk;

function aj(e) {
    return this.exp(e, new ae());
};

function bN(a, n, r) {
    var i = Math.min(this.t + a.t, n);
    r.s = 0;
    r.t = i;
    while (i > 0) r[--i] = 0;
    var j;
    for (j = r.t - this.t; i < j; ++i) r[i + this.t] = this.dX(0, a[i], r, i, 0, this.t);
    for (j = Math.min(a.t, n); i < j; ++i) this.dX(0, a[i], r, i, 0, n - i);
    r.fz();
};

function bK(a, n, r) {
    --n;
    var i = r.t = this.t + a.t - n;
    r.s = 0;
    while (--i >= 0) r[i] = 0;
    for (i = Math.max(n - this.t, 0); i < a.t; ++i) r[this.t + i - n] = this.dX(n - i, a[i], r, 0, 0, this.t + i - n);
    r.fz();
    r.io(1, r);
};

function bD(m) {
    this.r2 = K();
    this.iM = K();
    O.ONE.jf(2 * m.t, this.r2);
    this.mL = this.r2.divide(m);
    this.m = m;
};

function bz(x) {
    if (x.s < 0 || x.t > 2 * this.m.t) return x.cF(this.m); else if (x.cS(this.m) < 0) return x; else {
        var r = K();
        x.hw(r);
        this.reduce(r);
        return r;
    }
};

function ah(x) {
    return x;
};

function aU(x) {
    x.io(this.m.t - 1, this.r2);
    if (x.t > this.m.t + 1) {
        x.t = this.m.t + 1;
        x.fz();
    }
    this.mL.mN(this.r2, this.m.t + 1, this.iM);
    this.m.mB(this.iM, this.m.t + 1, this.r2);
    while (x.cS(this.r2) < 0) x.hb(1, this.m.t + 1);
    x.dF(this.r2, x);
    while (x.cS(this.m) >= 0) x.dF(this.m, x);
};

function aM(x, r) {
    x.gs(r);
    this.reduce(r);
};

function aT(x, y, r) {
    x.hG(y, r);
    this.reduce(r);
};bD.prototype.convert = bz;
bD.prototype.revert = ah;
bD.prototype.reduce = aU;
bD.prototype.fR = aT;
bD.prototype.fv = aM;

function aD(e, m) {
    var i = e.fl(), k, r = ap(1), z;
    if (i <= 0) return r; else if (i < 18) k = 1; else if (i < 48) k = 3; else if (i < 144) k = 4; else if (i < 768) k = 5; else k = 6;
    if (i < 8) z = new bI(m); else if (m.eQ()) z = new bD(m); else z = new aV(m);
    var g = new Array(), n = 3, gj = k - 1, gH = (1 << k) - 1;
    g[1] = z.convert(this);
    if (k > 1) {
        var ia = K();
        z.fv(g[1], ia);
        while (n <= gH) {
            g[n] = K();
            z.fR(ia, g[n - 2], g[n]);
            n += 2;
        }
    }
    var j = e.t - 1, w, iw = true, r2 = K(), t;
    i = aL(e[j]) - 1;
    while (j >= 0) {
        if (i >= gj) w = (e[j] >> (i - gj)) & gH; else {
            w = (e[j] & ((1 << (i + 1)) - 1)) << (gj - i);
            if (j > 0) w |= e[j - 1] >> (this.dE + i - gj);
        }
        n = k;
        while ((w & 1) == 0) {
            w >>= 1;
            --n;
        }
        if ((i -= n) < 0) {
            i += this.dE;
            --j;
        }
        if (iw) {
            g[w].hw(r);
            iw = false;
        } else {
            while (n > 1) {
                z.fv(r, r2);
                z.fv(r2, r);
                n -= 2;
            }
            if (n > 0) z.fv(r, r2); else {
                t = r;
                r = r2;
                r2 = t;
            }
            z.fR(r2, g[w], r);
        }
        while (j >= 0 && (e[j] & (1 << i)) == 0) {
            z.fv(r, r2);
            t = r;
            r = r2;
            r2 = t;
            if (--i < 0) {
                i = this.dE - 1;
                --j;
            }
        }
    }
    return z.revert(r);
};

function bd(a) {
    var x = (this.s < 0) ? this.fh() : this.clone();
    var y = (a.s < 0) ? a.fh() : a.clone();
    if (x.cS(y) < 0) {
        var t = x;
        x = y;
        y = t;
    }
    var i = x.hv(), g = y.hv();
    if (g < 0) return x;
    if (i < g) g = i;
    if (g > 0) {
        x.ej(g, x);
        y.ej(g, y);
    }
    while (x.eP() > 0) {
        if ((i = x.hv()) > 0) x.ej(i, x);
        if ((i = y.hv()) > 0) y.ej(i, y);
        if (x.cS(y) >= 0) {
            x.dF(y, x);
            x.ej(1, x);
        } else {
            y.dF(x, y);
            y.ej(1, y);
        }
    }
    if (g > 0) y.fU(g, y);
    return y;
};

function ai(n) {
    if (n <= 0) return 0;
    var d = this.ft % n, r = (this.s < 0) ? n - 1 : 0;
    if (this.t > 0) if (d == 0) r = this[0] % n; else for (var i = this.t - 1; i >= 0; --i) r = (d * r + this[i]) % n;
    return r;
};

function ay(m) {
    var gU = m.eQ();
    if ((this.eQ() && gU) || m.eP() == 0) return O.ZERO;
    var u = m.clone(), v = this.clone();
    var a = ap(1), b = ap(0), c = ap(0), d = ap(1);
    while (u.eP() != 0) {
        while (u.eQ()) {
            u.ej(1, u);
            if (gU) {
                if (!a.eQ() || !b.eQ()) {
                    a.gQ(this, a);
                    b.dF(m, b);
                }
                a.ej(1, a);
            } else if (!b.eQ()) b.dF(m, b);
            b.ej(1, b);
        }
        while (v.eQ()) {
            v.ej(1, v);
            if (gU) {
                if (!c.eQ() || !d.eQ()) {
                    c.gQ(this, c);
                    d.dF(m, d);
                }
                c.ej(1, c);
            } else if (!d.eQ()) d.dF(m, d);
            d.ej(1, d);
        }
        if (u.cS(v) >= 0) {
            u.dF(v, u);
            if (gU) a.dF(c, a);
            b.dF(d, b);
        } else {
            v.dF(u, v);
            if (gU) c.dF(a, c);
            d.dF(b, d);
        }
    }
    if (v.cS(O.ONE) != 0) return O.ZERO;
    if (d.cS(m) >= 0) return d.fA(m);
    if (d.eP() < 0) d.gQ(m, d); else return d;
    if (d.eP() < 0) return d.add(m); else return d;
};var eD = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];
var mK = (1 << 26) / eD[eD.length - 1];

function aP(t) {
    var i, x = this.abs();
    if (x.t == 1 && x[0] <= eD[eD.length - 1]) {
        for (i = 0; i < eD.length; ++i) if (x[0] == eD[i]) return true;
        return false;
    }
    if (x.eQ()) return false;
    i = 1;
    while (i < eD.length) {
        var m = eD[i], j = i + 1;
        while (j < eD.length && m < mK) m *= eD[j++];
        m = x.lL(m);
        while (i < j) if (m % eD[i++] == 0) return false;
    }
    return x.mY(t);
};

function by(t) {
    var hq = this.fA(O.ONE);
    var k = hq.hv();
    if (k <= 0) return false;
    var r = hq.lb(k);
    t = (t + 1) >> 1;
    if (t > eD.length) t = eD.length;
    var a = K();
    for (var i = 0; i < t; ++i) {
        a.hH(eD[Math.floor(AostarJS.el.gy.jz() * eD.length)]);
        var y = a.lM(r, this);
        if (y.cS(O.ONE) != 0 && y.cS(hq) != 0) {
            var j = 1;
            while (j++ < k && y.cS(hq) != 0) {
                y = y.pE(2, this);
                if (y.cS(O.ONE) == 0) return false;
            }
            if (y.cS(hq) != 0) return false;
        }
    }
    return true;
};O.prototype.lA = bU;
O.prototype.eE = be;
O.prototype.pd = aw;
O.prototype.kn = bV;
O.prototype.fH = aW;
O.prototype.ix = aq;
O.prototype.gQ = aO;
O.prototype.jN = aE;
O.prototype.hb = bn;
O.prototype.mB = bN;
O.prototype.mN = bK;
O.prototype.lL = ai;
O.prototype.mY = by;
O.prototype.clone = bC;
O.prototype.gD = aZ;
O.prototype.sj = bE;
O.prototype.rC = aQ;
O.prototype.eP = aN;
O.prototype.so = bO;
O.prototype.eS = ab;
O.prototype.min = aJ;
O.prototype.max = an;
O.prototype.and = bq;
O.prototype.lu = bp;
O.prototype.xor = bJ;
O.prototype.tF = ao;
O.prototype.not = aR;
O.prototype.shiftLeft = aF;
O.prototype.lb = ag;
O.prototype.hv = bG;
O.prototype.tI = bf;
O.prototype.en = bw;
O.prototype.sd = aY;
O.prototype.rJ = bj;
O.prototype.ug = bb;
O.prototype.add = ax;
O.prototype.fA = aS;
O.prototype.multiply = bh;
O.prototype.divide = aa;
O.prototype.vX = aI;
O.prototype.sR = aX;
O.prototype.lM = aD;
O.prototype.hx = ay;
O.prototype.pow = aj;
O.prototype.uT = bd;
O.prototype.me = aP;
O.prototype.square = as;
O.prototype.bD = bD;
var gX;
var fF;
var cg;

function bS(x) {
    fF[cg++] ^= x & 255;
    fF[cg++] ^= (x >> 8) & 255;
    fF[cg++] ^= (x >> 16) & 255;
    fF[cg++] ^= (x >> 24) & 255;
    if (cg >= gu) cg -= gu;
};

function af() {
    bS(new Date().getTime());
};
if (fF == null) {
    fF = new Array();
    cg = 0;
    var t;
    if (typeof window !== "undefined" && window.crypto) {
        if (window.crypto.ox) {
            var ua = new Uint8Array(32);
            window.crypto.ox(ua);
            for (t = 0; t < 32; ++t) fF[cg++] = ua[t];
        } else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
            var z = window.crypto.random(32);
            for (t = 0; t < z.length; ++t) fF[cg++] = z.charCodeAt(t) & 255;
        }
    }
    while (cg < gu) {
        t = Math.floor(65536 * AostarJS.el.gy.jz());
        fF[cg++] = t >>> 8;
        fF[cg++] = t & 255;
    }
    cg = 0;
    af();
}

function bg() {
    if (gX == null) {
        af();
        gX = bx();
        gX.eZ(fF);
        for (cg = 0; cg < fF.length; ++cg) fF[cg] = 0;
        cg = 0;
    }
    return gX.next();
};

function bQ(ko) {
    var i;
    for (i = 0; i < ko.length; ++i) ko[i] = bg();
};

function bv() {
};bv.prototype.ma = bQ;

function bA() {
    this.i = 0;
    this.j = 0;
    this.S = new Array();
};

function bc(key) {
    var i, j, t;
    for (i = 0; i < 256; ++i) this.S[i] = i;
    j = 0;
    for (i = 0; i < 256; ++i) {
        j = (j + this.S[i] + key[i % key.length]) & 255;
        t = this.S[i];
        this.S[i] = this.S[j];
        this.S[j] = t;
    }
    this.i = 0;
    this.j = 0;
};

function ad() {
    var t;
    this.i = (this.i + 1) & 255;
    this.j = (this.j + this.S[this.i]) & 255;
    t = this.S[this.i];
    this.S[this.i] = this.S[this.j];
    this.S[this.j] = t;
    return this.S[(t + this.S[this.i]) & 255];
};bA.prototype.eZ = bc;
bA.prototype.next = ad;

function bx() {
    return new bA();
};var gu = 256;
if (typeof qI !== 'undefined') {
    qI = ve.qI = {O: O, bv: bv};
} else {
    this.wl = {O: O, bv: bv};
}

function bC() {
    var r = K();
    this.hw(r);
    return r;
};

function aZ() {
    if (this.s < 0) {
        if (this.t == 1) return this[0] - this.ft; else if (this.t == 0) return -1;
    } else if (this.t == 1) return this[0]; else if (this.t == 0) return 0;
    return ((this[1] & ((1 << (32 - this.dE)) - 1)) << this.dE) | this[0];
};

function bE() {
    return (this.t == 0) ? this.s : (this[0] << 24) >> 24;
};

function aQ() {
    return (this.t == 0) ? this.s : (this[0] << 16) >> 16;
};

function bU(r) {
    return Math.floor(Math.LN2 * this.dE / Math.log(r));
};

function aN() {
    if (this.s < 0) return -1; else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; else return 1;
};

function be(b) {
    if (b == null) b = 10;
    if (this.eP() == 0 || b < 2 || b > 36) return "0";
    var gm = this.lA(b);
    var a = Math.pow(b, gm);
    var d = ap(a), y = K(), z = K(), r = "";
    this.fw(d, y, z);
    while (y.eP() > 0) {
        r = (a + z.gD()).toString(b).substr(1) + r;
        y.fw(d, y, z);
    }
    return z.gD().toString(b) + r;
};

function aw(s, b) {
    this.hH(0);
    if (b == null) b = 10;
    var gm = this.lA(b);
    var d = Math.pow(b, gm), gG = false, j = 0, w = 0;
    for (var i = 0; i < s.length; ++i) {
        var x = aA(s, i);
        if (x < 0) {
            if (s.charAt(i) == "-" && this.eP() == 0) gG = true;
            continue;
        }
        w = b * w + x;
        if (++j >= gm) {
            this.jN(d);
            this.hb(w, 0);
            j = 0;
            w = 0;
        }
    }
    if (j > 0) {
        this.jN(Math.pow(b, j));
        this.hb(w, 0);
    }
    if (gG) O.ZERO.dF(this, this);
};

function bV(a, b, c) {
    if ("number" == typeof b) {
        if (a < 2) this.hH(1); else {
            this.kn(a, c);
            if (!this.en(a - 1)) this.fH(O.ONE.shiftLeft(a - 1), az, this);
            if (this.eQ()) this.hb(1, 0);
            while (!this.me(b)) {
                this.hb(2, 0);
                if (this.fl() > a) this.dF(O.ONE.shiftLeft(a - 1), this);
            }
        }
    } else {
        var x = new Array(), t = a & 7;
        x.length = (a >> 3) + 1;
        b.ma(x);
        if (t > 0) x[0] &= ((1 << t) - 1); else x[0] = 0;
        this.nc(x, 256);
    }
};

function bO() {
    var i = this.t, r = new Array();
    r[0] = this.s;
    var p = this.dE - (i * this.dE) % 8, d, k = 0;
    if (i-- > 0) {
        if (p < this.dE && (d = this[i] >> p) != (this.s & this.fi) >> p) r[k++] = d | (this.s << (this.dE - p));
        while (i >= 0) {
            if (p < 8) {
                d = (this[i] & ((1 << p) - 1)) << (8 - p);
                d |= this[--i] >> (p += this.dE - 8);
            } else {
                d = (this[i] >> (p -= 8)) & 0xff;
                if (p <= 0) {
                    p += this.dE;
                    --i;
                }
            }
            if ((d & 0x80) != 0) d |= -256;
            if (k == 0 && (this.s & 0x80) != (d & 0x80)) ++k;
            if (k > 0 || d != this.s) r[k++] = d;
        }
    }
    return r;
};

function ab(a) {
    return (this.cS(a) == 0);
};

function aJ(a) {
    return (this.cS(a) < 0) ? this : a;
};

function an(a) {
    return (this.cS(a) > 0) ? this : a;
};

function aW(a, ez, r) {
    var i, f, m = Math.min(a.t, this.t);
    for (i = 0; i < m; ++i) r[i] = ez(this[i], a[i]);
    if (a.t < this.t) {
        f = a.s & this.fi;
        for (i = m; i < this.t; ++i) r[i] = ez(this[i], f);
        r.t = this.t;
    } else {
        f = this.s & this.fi;
        for (i = m; i < a.t; ++i) r[i] = ez(f, a[i]);
        r.t = a.t;
    }
    r.s = ez(this.s, a.s);
    r.fz();
};

function bM(x, y) {
    return x & y;
};

function bq(a) {
    var r = K();
    this.fH(a, bM, r);
    return r;
};

function az(x, y) {
    return x | y;
};

function bp(a) {
    var r = K();
    this.fH(a, az, r);
    return r;
};

function bu(x, y) {
    return x ^ y;
};

function bJ(a) {
    var r = K();
    this.fH(a, bu, r);
    return r;
};

function aB(x, y) {
    return x & ~y;
};

function ao(a) {
    var r = K();
    this.fH(a, aB, r);
    return r;
};

function aR() {
    var r = K();
    for (var i = 0; i < this.t; ++i) r[i] = this.fi & ~this[i];
    r.t = this.t;
    r.s = ~this.s;
    return r;
};

function aF(n) {
    var r = K();
    if (n < 0) this.ej(-n, r); else this.fU(n, r);
    return r;
};

function ag(n) {
    var r = K();
    if (n < 0) this.fU(-n, r); else this.ej(n, r);
    return r;
};

function bP(x) {
    if (x == 0) return -1;
    var r = 0;
    if ((x & 0xffff) == 0) {
        x >>= 16;
        r += 16;
    }
    if ((x & 0xff) == 0) {
        x >>= 8;
        r += 8;
    }
    if ((x & 0xf) == 0) {
        x >>= 4;
        r += 4;
    }
    if ((x & 3) == 0) {
        x >>= 2;
        r += 2;
    }
    if ((x & 1) == 0) ++r;
    return r;
};

function bG() {
    for (var i = 0; i < this.t; ++i) if (this[i] != 0) return i * this.dE + bP(this[i]);
    if (this.s < 0) return this.t * this.dE;
    return -1;
};

function aC(x) {
    var r = 0;
    while (x != 0) {
        x &= x - 1;
        ++r;
    }
    return r;
};

function bf() {
    var r = 0, x = this.s & this.fi;
    for (var i = 0; i < this.t; ++i) r += aC(this[i] ^ x);
    return r;
};

function bw(n) {
    var j = Math.floor(n / this.dE);
    if (j >= this.t) return (this.s != 0);
    return ((this[j] & (1 << (n % this.dE))) != 0);
};

function aq(n, ez) {
    var r = O.ONE.shiftLeft(n);
    this.fH(r, ez, r);
    return r;
};

function aY(n) {
    return this.ix(n, az);
};

function bj(n) {
    return this.ix(n, aB);
};

function bb(n) {
    return this.ix(n, bu);
};

function aO(a, r) {
    var i = 0, c = 0, m = Math.min(a.t, this.t);
    while (i < m) {
        c += this[i] + a[i];
        r[i++] = c & this.fi;
        c >>= this.dE;
    }
    if (a.t < this.t) {
        c += a.s;
        while (i < this.t) {
            c += this[i];
            r[i++] = c & this.fi;
            c >>= this.dE;
        }
        c += this.s;
    } else {
        c += this.s;
        while (i < a.t) {
            c += a[i];
            r[i++] = c & this.fi;
            c >>= this.dE;
        }
        c += a.s;
    }
    r.s = (c < 0) ? -1 : 0;
    if (c > 0) r[i++] = c; else if (c < -1) r[i++] = this.ft + c;
    r.t = i;
    r.fz();
};

function ax(a) {
    var r = K();
    this.gQ(a, r);
    return r;
};

function aS(a) {
    var r = K();
    this.dF(a, r);
    return r;
};

function bh(a) {
    var r = K();
    this.hG(a, r);
    return r;
};

function as() {
    var r = K();
    this.gs(r);
    return r;
};

function aa(a) {
    var r = K();
    this.fw(a, r, null);
    return r;
};

function aI(a) {
    var r = K();
    this.fw(a, null, r);
    return r;
};

function aX(a) {
    var q = K(), r = K();
    this.fw(a, q, r);
    return new Array(q, r);
};

function aE(n) {
    this[this.t] = this.dX(0, n - 1, this, 0, 0, this.t);
    ++this.t;
    this.fz();
};

function bn(n, w) {
    if (n == 0) return;
    while (this.t <= w) this[this.t++] = 0;
    this[w] += n;
    while (this[w] >= this.ft) {
        this[w] -= this.ft;
        if (++w >= this.t) this[this.t++] = 0;
        ++this[w];
    }
};

function ae() {
};

function bL(x) {
    return x;
};

function ar(x, y, r) {
    x.hG(y, r);
};

function bk(x, r) {
    x.gs(r);
};ae.prototype.convert = bL;
ae.prototype.revert = bL;
ae.prototype.fR = ar;
ae.prototype.fv = bk;

function aj(e) {
    return this.exp(e, new ae());
};

function bN(a, n, r) {
    var i = Math.min(this.t + a.t, n);
    r.s = 0;
    r.t = i;
    while (i > 0) r[--i] = 0;
    var j;
    for (j = r.t - this.t; i < j; ++i) r[i + this.t] = this.dX(0, a[i], r, i, 0, this.t);
    for (j = Math.min(a.t, n); i < j; ++i) this.dX(0, a[i], r, i, 0, n - i);
    r.fz();
};

function bK(a, n, r) {
    --n;
    var i = r.t = this.t + a.t - n;
    r.s = 0;
    while (--i >= 0) r[i] = 0;
    for (i = Math.max(n - this.t, 0); i < a.t; ++i) r[this.t + i - n] = this.dX(n - i, a[i], r, 0, 0, this.t + i - n);
    r.fz();
    r.io(1, r);
};

function bD(m) {
    this.r2 = K();
    this.iM = K();
    O.ONE.jf(2 * m.t, this.r2);
    this.mL = this.r2.divide(m);
    this.m = m;
};

function bz(x) {
    if (x.s < 0 || x.t > 2 * this.m.t) return x.cF(this.m); else if (x.cS(this.m) < 0) return x; else {
        var r = K();
        x.hw(r);
        this.reduce(r);
        return r;
    }
};

function ah(x) {
    return x;
};

function aU(x) {
    x.io(this.m.t - 1, this.r2);
    if (x.t > this.m.t + 1) {
        x.t = this.m.t + 1;
        x.fz();
    }
    this.mL.mN(this.r2, this.m.t + 1, this.iM);
    this.m.mB(this.iM, this.m.t + 1, this.r2);
    while (x.cS(this.r2) < 0) x.hb(1, this.m.t + 1);
    x.dF(this.r2, x);
    while (x.cS(this.m) >= 0) x.dF(this.m, x);
};

function aM(x, r) {
    x.gs(r);
    this.reduce(r);
};

function aT(x, y, r) {
    x.hG(y, r);
    this.reduce(r);
};bD.prototype.convert = bz;
bD.prototype.revert = ah;
bD.prototype.reduce = aU;
bD.prototype.fR = aT;
bD.prototype.fv = aM;

function aD(e, m) {
    var i = e.fl(), k, r = ap(1), z;
    if (i <= 0) return r; else if (i < 18) k = 1; else if (i < 48) k = 3; else if (i < 144) k = 4; else if (i < 768) k = 5; else k = 6;
    if (i < 8) z = new bI(m); else if (m.eQ()) z = new bD(m); else z = new aV(m);
    var g = new Array(), n = 3, gj = k - 1, gH = (1 << k) - 1;
    g[1] = z.convert(this);
    if (k > 1) {
        var ia = K();
        z.fv(g[1], ia);
        while (n <= gH) {
            g[n] = K();
            z.fR(ia, g[n - 2], g[n]);
            n += 2;
        }
    }
    var j = e.t - 1, w, iw = true, r2 = K(), t;
    i = aL(e[j]) - 1;
    while (j >= 0) {
        if (i >= gj) w = (e[j] >> (i - gj)) & gH; else {
            w = (e[j] & ((1 << (i + 1)) - 1)) << (gj - i);
            if (j > 0) w |= e[j - 1] >> (this.dE + i - gj);
        }
        n = k;
        while ((w & 1) == 0) {
            w >>= 1;
            --n;
        }
        if ((i -= n) < 0) {
            i += this.dE;
            --j;
        }
        if (iw) {
            g[w].hw(r);
            iw = false;
        } else {
            while (n > 1) {
                z.fv(r, r2);
                z.fv(r2, r);
                n -= 2;
            }
            if (n > 0) z.fv(r, r2); else {
                t = r;
                r = r2;
                r2 = t;
            }
            z.fR(r2, g[w], r);
        }
        while (j >= 0 && (e[j] & (1 << i)) == 0) {
            z.fv(r, r2);
            t = r;
            r = r2;
            r2 = t;
            if (--i < 0) {
                i = this.dE - 1;
                --j;
            }
        }
    }
    return z.revert(r);
};

function bd(a) {
    var x = (this.s < 0) ? this.fh() : this.clone();
    var y = (a.s < 0) ? a.fh() : a.clone();
    if (x.cS(y) < 0) {
        var t = x;
        x = y;
        y = t;
    }
    var i = x.hv(), g = y.hv();
    if (g < 0) return x;
    if (i < g) g = i;
    if (g > 0) {
        x.ej(g, x);
        y.ej(g, y);
    }
    while (x.eP() > 0) {
        if ((i = x.hv()) > 0) x.ej(i, x);
        if ((i = y.hv()) > 0) y.ej(i, y);
        if (x.cS(y) >= 0) {
            x.dF(y, x);
            x.ej(1, x);
        } else {
            y.dF(x, y);
            y.ej(1, y);
        }
    }
    if (g > 0) y.fU(g, y);
    return y;
};

function ai(n) {
    if (n <= 0) return 0;
    var d = this.ft % n, r = (this.s < 0) ? n - 1 : 0;
    if (this.t > 0) if (d == 0) r = this[0] % n; else for (var i = this.t - 1; i >= 0; --i) r = (d * r + this[i]) % n;
    return r;
};

function ay(m) {
    var gU = m.eQ();
    if ((this.eQ() && gU) || m.eP() == 0) return O.ZERO;
    var u = m.clone(), v = this.clone();
    var a = ap(1), b = ap(0), c = ap(0), d = ap(1);
    while (u.eP() != 0) {
        while (u.eQ()) {
            u.ej(1, u);
            if (gU) {
                if (!a.eQ() || !b.eQ()) {
                    a.gQ(this, a);
                    b.dF(m, b);
                }
                a.ej(1, a);
            } else if (!b.eQ()) b.dF(m, b);
            b.ej(1, b);
        }
        while (v.eQ()) {
            v.ej(1, v);
            if (gU) {
                if (!c.eQ() || !d.eQ()) {
                    c.gQ(this, c);
                    d.dF(m, d);
                }
                c.ej(1, c);
            } else if (!d.eQ()) d.dF(m, d);
            d.ej(1, d);
        }
        if (u.cS(v) >= 0) {
            u.dF(v, u);
            if (gU) a.dF(c, a);
            b.dF(d, b);
        } else {
            v.dF(u, v);
            if (gU) c.dF(a, c);
            d.dF(b, d);
        }
    }
    if (v.cS(O.ONE) != 0) return O.ZERO;
    if (d.cS(m) >= 0) return d.fA(m);
    if (d.eP() < 0) d.gQ(m, d); else return d;
    if (d.eP() < 0) return d.add(m); else return d;
};var eD = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];
var mK = (1 << 26) / eD[eD.length - 1];

function aP(t) {
    var i, x = this.abs();
    if (x.t == 1 && x[0] <= eD[eD.length - 1]) {
        for (i = 0; i < eD.length; ++i) if (x[0] == eD[i]) return true;
        return false;
    }
    if (x.eQ()) return false;
    i = 1;
    while (i < eD.length) {
        var m = eD[i], j = i + 1;
        while (j < eD.length && m < mK) m *= eD[j++];
        m = x.lL(m);
        while (i < j) if (m % eD[i++] == 0) return false;
    }
    return x.mY(t);
};

function by(t) {
    var hq = this.fA(O.ONE);
    var k = hq.hv();
    if (k <= 0) return false;
    var r = hq.lb(k);
    t = (t + 1) >> 1;
    if (t > eD.length) t = eD.length;
    var a = K();
    for (var i = 0; i < t; ++i) {
        a.hH(eD[Math.floor(AostarJS.el.gy.jz() * eD.length)]);
        var y = a.lM(r, this);
        if (y.cS(O.ONE) != 0 && y.cS(hq) != 0) {
            var j = 1;
            while (j++ < k && y.cS(hq) != 0) {
                y = y.pE(2, this);
                if (y.cS(O.ONE) == 0) return false;
            }
            if (y.cS(hq) != 0) return false;
        }
    }
    return true;
};O.prototype.lA = bU;
O.prototype.eE = be;
O.prototype.pd = aw;
O.prototype.kn = bV;
O.prototype.fH = aW;
O.prototype.ix = aq;
O.prototype.gQ = aO;
O.prototype.jN = aE;
O.prototype.hb = bn;
O.prototype.mB = bN;
O.prototype.mN = bK;
O.prototype.lL = ai;
O.prototype.mY = by;
O.prototype.clone = bC;
O.prototype.gD = aZ;
O.prototype.sj = bE;
O.prototype.rC = aQ;
O.prototype.eP = aN;
O.prototype.so = bO;
O.prototype.eS = ab;
O.prototype.min = aJ;
O.prototype.max = an;
O.prototype.and = bq;
O.prototype.lu = bp;
O.prototype.xor = bJ;
O.prototype.tF = ao;
O.prototype.not = aR;
O.prototype.shiftLeft = aF;
O.prototype.lb = ag;
O.prototype.hv = bG;
O.prototype.tI = bf;
O.prototype.en = bw;
O.prototype.sd = aY;
O.prototype.rJ = bj;
O.prototype.ug = bb;
O.prototype.add = ax;
O.prototype.fA = aS;
O.prototype.multiply = bh;
O.prototype.divide = aa;
O.prototype.vX = aI;
O.prototype.sR = aX;
O.prototype.lM = aD;
O.prototype.hx = ay;
O.prototype.pow = aj;
O.prototype.uT = bd;
O.prototype.me = aP;
O.prototype.square = as;

function bA() {
    this.i = 0;
    this.j = 0;
    this.S = new Array();
};

function bc(key) {
    var i, j, t;
    for (i = 0; i < 256; ++i) this.S[i] = i;
    j = 0;
    for (i = 0; i < 256; ++i) {
        j = (j + this.S[i] + key[i % key.length]) & 255;
        t = this.S[i];
        this.S[i] = this.S[j];
        this.S[j] = t;
    }
    this.i = 0;
    this.j = 0;
};

function ad() {
    var t;
    this.i = (this.i + 1) & 255;
    this.j = (this.j + this.S[this.i]) & 255;
    t = this.S[this.i];
    this.S[this.i] = this.S[this.j];
    this.S[this.j] = t;
    return this.S[(t + this.S[this.i]) & 255];
};bA.prototype.eZ = bc;
bA.prototype.next = ad;

function bx() {
    return new bA();
};var gu = 256;
var gX;
var fF;
var cg;

function bS(x) {
    fF[cg++] ^= x & 255;
    fF[cg++] ^= (x >> 8) & 255;
    fF[cg++] ^= (x >> 16) & 255;
    fF[cg++] ^= (x >> 24) & 255;
    if (cg >= gu) cg -= gu;
};

function af() {
    bS(new Date().getTime());
};
if (fF == null) {
    fF = new Array();
    cg = 0;
    var t;
    if (window.crypto && window.crypto.ox) {
        var ua = new Uint8Array(32);
        window.crypto.ox(ua);
        for (t = 0; t < 32; ++t) fF[cg++] = ua[t];
    }
    if (navigator.appName == "Netscape" && navigator.appVersion < "5" && window.crypto) {
        var z = window.crypto.random(32);
        for (t = 0; t < z.length; ++t) fF[cg++] = z.charCodeAt(t) & 255;
    }
    while (cg < gu) {
        t = Math.floor(65536 * AostarJS.el.gy.jz());
        fF[cg++] = t >>> 8;
        fF[cg++] = t & 255;
    }
    cg = 0;
    af();
}

function bg() {
    if (gX == null) {
        af();
        gX = bx();
        gX.eZ(fF);
        for (cg = 0; cg < fF.length; ++cg) fF[cg] = 0;
        cg = 0;
    }
    return gX.next();
};

function bQ(ko) {
    var i;
    for (i = 0; i < ko.length; ++i) ko[i] = bg();
};

function bv() {
};bv.prototype.ma = bQ;
if (typeof Aostar == "undefined" || !Aostar) Aostar = {};
if (typeof Aostar.crypto == "undefined" || !Aostar.crypto) Aostar.crypto = {};
Aostar.crypto.dV = new function () {
    this.nj = {
        'gf': "3021300906052b0e03021a05000414",
        'sha224': "302d300d06096086480165030402040500041c",
        'hc': "3031300d060960864801650304020105000420",
        'sha384': "3041300d060960864801650304020205000430",
        'fP': "3051300d060960864801650304020305000440",
        'md2': "3020300c06082a864886f70d020205000410",
        'hD': "3020300c06082a864886f70d020505000410",
        'gw': "3021300906052b2403020105000414"
    };
    this.ka = {
        'hD': 'cryptojs',
        'gf': 'cryptojs',
        'sha224': 'cryptojs',
        'hc': 'cryptojs',
        'sha384': 'cryptojs',
        'fP': 'cryptojs',
        'gw': 'cryptojs',
        'hmacmd5': 'cryptojs',
        'hmacsha1': 'cryptojs',
        'hmacsha224': 'cryptojs',
        'hmacsha256': 'cryptojs',
        'hmacsha384': 'cryptojs',
        'hmacsha512': 'cryptojs',
        'hmacripemd160': 'cryptojs',
        'sm3': 'cryptojs',
        'MD5withRSA': 'cryptojs/jsrsa',
        'SHA1withRSA': 'cryptojs/jsrsa',
        'SHA224withRSA': 'cryptojs/jsrsa',
        'SHA256withRSA': 'cryptojs/jsrsa',
        'SHA384withRSA': 'cryptojs/jsrsa',
        'SHA512withRSA': 'cryptojs/jsrsa',
        'RIPEMD160withRSA': 'cryptojs/jsrsa',
        'MD5withECDSA': 'cryptojs/jsrsa',
        'SHA1withECDSA': 'cryptojs/jsrsa',
        'SHA224withECDSA': 'cryptojs/jsrsa',
        'SHA256withECDSA': 'cryptojs/jsrsa',
        'SHA384withECDSA': 'cryptojs/jsrsa',
        'SHA512withECDSA': 'cryptojs/jsrsa',
        'RIPEMD160withECDSA': 'cryptojs/jsrsa',
        'SHA1withDSA': 'cryptojs/jsrsa',
        'SHA224withDSA': 'cryptojs/jsrsa',
        'SHA256withDSA': 'cryptojs/jsrsa',
        'MD5withRSAandMGF1': 'cryptojs/jsrsa',
        'SHA1withRSAandMGF1': 'cryptojs/jsrsa',
        'SHA224withRSAandMGF1': 'cryptojs/jsrsa',
        'SHA256withRSAandMGF1': 'cryptojs/jsrsa',
        'SHA384withRSAandMGF1': 'cryptojs/jsrsa',
        'SHA512withRSAandMGF1': 'cryptojs/jsrsa',
        'RIPEMD160withRSAandMGF1': 'cryptojs/jsrsa'
    };
    this.rk = {
        'hD': 'AostarJS.hk.MD5',
        'gf': 'AostarJS.hk.SHA1',
        'sha224': 'AostarJS.hk.SHA224',
        'hc': 'AostarJS.hk.SHA256',
        'sha384': 'AostarJS.hk.SHA384',
        'fP': 'AostarJS.hk.SHA512',
        'gw': 'AostarJS.hk.RIPEMD160',
        'sm3': 'AostarJS.hk.jx'
    };
    this.tX = function (nv, cP) {
        if (typeof this.nj[cP] == "undefined") throw "cP not supported in dV.nj: " + cP;
        return this.nj[cP] + nv;
    };
    this.wi = function (nv, cP, gc) {
        var nf = this.tX(nv, cP);
        var pf = gc / 4;
        if (nf.length + 22 > pf) throw "key is too short for SigAlg: hU=" + gc + "," + cP;
        var pv = "0001";
        var pM = "00" + nf;
        var qA = "";
        var uJ = pf - pv.length - pM.length;
        for (var i = 0; i < uJ; i += 2) {
            qA += "ff";
        }
        var sZ = pv + qA + pM;
        return sZ;
    };
    this.vz = function (s, cP) {
        var cq = new Aostar.crypto.hm({'cP': cP});
        return cq.gW(s);
    };
    this.fN = function (rQ, cP) {
        var cq = new Aostar.crypto.hm({'cP': cP});
        return cq.fS(rQ);
    };
    this.gf = function (s) {
        var cq = new Aostar.crypto.hm({'cP': 'gf', 'dC': 'cryptojs'});
        return cq.gW(s);
    };
    this.hc = function (s) {
        var cq = new Aostar.crypto.hm({'cP': 'hc', 'dC': 'cryptojs'});
        return cq.gW(s);
    };
    this.vl = function (s) {
        var cq = new Aostar.crypto.hm({'cP': 'hc', 'dC': 'cryptojs'});
        return cq.fS(s);
    };
    this.fP = function (s) {
        var cq = new Aostar.crypto.hm({'cP': 'fP', 'dC': 'cryptojs'});
        return cq.gW(s);
    };
    this.vr = function (s) {
        var cq = new Aostar.crypto.hm({'cP': 'fP', 'dC': 'cryptojs'});
        return cq.fS(s);
    };
    this.hD = function (s) {
        var cq = new Aostar.crypto.hm({'cP': 'hD', 'dC': 'cryptojs'});
        return cq.gW(s);
    };
    this.gw = function (s) {
        var cq = new Aostar.crypto.hm({'cP': 'gw', 'dC': 'cryptojs'});
        return cq.gW(s);
    };
    this.we = function (s) {
    };
};
Aostar.crypto.hm = function (cE) {
    var cq = null;
    var ei = null;
    var fC = null;
    this.gC = function (cP, dC) {
        if (cP != null && dC === undefined) dC = Aostar.crypto.dV.ka[cP];
        if (':hD:gf:sha224:hc:sha384:fP:gw:sm3:'.indexOf(cP) != -1 && dC == 'cryptojs') {
            try {
                this.cq = eval(Aostar.crypto.dV.rk[cP]).create();
            } catch (ex) {
                throw "gC hash cP set fail cP=" + cP + "/" + ex;
            }
            this.fq = function (ee) {
                this.cq.update(ee);
            };
            this.eW = function (cn) {
                var pq = AostarJS.el.jo.parse(cn);
                this.cq.update(pq);
            };
            this.gY = function () {
                var hash = this.cq.gS();
                return hash.toString(AostarJS.el.jo);
            };
            this.gW = function (ee) {
                this.fq(ee);
                return this.gY();
            };
            this.fS = function (cn) {
                this.eW(cn);
                return this.gY();
            };
        }
        if (':hc:'.indexOf(cP) != -1 && dC == 'nt') {
            try {
                this.cq = new nt.hash.hc();
            } catch (ex) {
                throw "gC hash cP set fail cP=" + cP + "/" + ex;
            }
            this.fq = function (ee) {
                this.cq.update(ee);
            };
            this.eW = function (cn) {
                var ue = nt.rO.cn.wb(cn);
                this.cq.update(ue);
            };
            this.gY = function () {
                var hash = this.cq.gS();
                return nt.rO.cn.wj(hash);
            };
            this.gW = function (ee) {
                this.fq(ee);
                return this.gY();
            };
            this.fS = function (cn) {
                this.eW(cn);
                return this.gY();
            };
        }
    };
    this.fq = function (ee) {
        throw "fq(ee) not supported for this cP/dC: " + this.ei + "/" + this.fC;
    };
    this.eW = function (cn) {
        throw "eW(cn) not supported for this cP/dC: " + this.ei + "/" + this.fC;
    };
    this.gY = function () {
        throw "gY() not supported for this cP/dC: " + this.ei + "/" + this.fC;
    };
    this.gW = function (ee) {
        throw "gW(ee) not supported for this cP/dC: " + this.ei + "/" + this.fC;
    };
    this.fS = function (cn) {
        throw "fS(cn) not supported for this cP/dC: " + this.ei + "/" + this.fC;
    };
    if (cE !== undefined) {
        if (cE['cP'] !== undefined) {
            this.ei = cE['cP'];
            if (cE['dC'] === undefined) this.fC = Aostar.crypto.dV.ka[this.ei];
            this.gC(this.ei, this.fC);
        }
    }
};
Aostar.crypto.wC = function (cE) {
    var lm = null;
    var gJ = null;
    var ei = null;
    var fC = null;
    var ja = null;
    this.gC = function (cP, dC) {
        if (cP == null) cP = "hmacsha1";
        cP = cP.toLowerCase();
        if (cP.substr(0, 4) != "hmac") {
            throw "gC unsupported qf cP: " + cP;
        }
        if (dC === undefined) dC = Aostar.crypto.dV.ka[cP];
        this.ja = cP + "/" + dC;
        var kV = cP.substr(4);
        if (':hD:gf:sha224:hc:sha384:fP:gw:'.indexOf(kV) != -1 && dC == 'cryptojs') {
            try {
                var tu = eval(Aostar.crypto.dV.rk[kV]);
                this.lm = AostarJS.hk.qf.create(tu, this.gJ);
            } catch (ex) {
                throw "gC hash cP set fail kV=" + kV + "/" + ex;
            }
            this.fq = function (ee) {
                this.lm.update(ee);
            };
            this.eW = function (cn) {
                var pq = AostarJS.el.jo.parse(cn);
                this.lm.update(pq);
            };
            this.mA = function () {
                var hash = this.lm.gS();
                return hash.toString(AostarJS.el.jo);
            };
            this.rV = function (ee) {
                this.fq(ee);
                return this.mA();
            };
            this.rF = function (cn) {
                this.eW(cn);
                return this.mA();
            };
        }
    };
    this.fq = function (ee) {
        throw "fq(ee) not supported for this cP/dC: " + this.ja;
    };
    this.eW = function (cn) {
        throw "eW(cn) not supported for this cP/dC: " + this.ja;
    };
    this.mA = function () {
        throw "gY() not supported for this cP/dC: " + this.ja;
    };
    this.rV = function (ee) {
        throw "gW(ee) not supported for this cP/dC: " + this.ja;
    };
    this.rF = function (cn) {
        throw "fS(cn) not supported for this cP/dC: " + this.ja;
    };
    if (cE !== undefined) {
        if (cE['gJ'] !== undefined) {
            this.gJ = cE['gJ'];
        }
        if (cE['cP'] !== undefined) {
            this.ei = cE['cP'];
            if (cE['dC'] === undefined) this.fC = Aostar.crypto.dV.ka[this.ei];
            this.gC(this.ei, this.fC);
        }
    }
};
Aostar.crypto.gn = function (cE) {
    var eV = null;
    var fI = null;
    var cq = null;
    var dz = null;
    var ei = null;
    var fC = null;
    var gE = null;
    var fY = null;
    var jb = null;
    var state = null;
    var nk = -1;
    var sT = null;
    var ea = null;
    var nf = null;
    var wD = null;
    var iu = null;
    this.ro = function () {
        if (this.ei.match(/^(.+)with(.+)$/)) {
            this.fY = RegExp.$1.toLowerCase();
            this.jb = RegExp.$2.toLowerCase();
        }
    };
    this.vV = function (cn, fl) {
        var s = "";
        var tQ = fl / 4 - cn.length;
        for (var i = 0; i < tQ; i++) {
            s = s + "0";
        }
        return s + cn;
    };
    this.gC = function (cP, dC) {
        this.ro();
        if (dC != 'cryptojs/jsrsa') throw "provider not supported: " + dC;
        if (':hD:gf:sha224:hc:sha384:fP:gw:sm3:'.indexOf(this.fY) != -1) {
            try {
                this.cq = new Aostar.crypto.hm({'cP': this.fY});
            } catch (ex) {
                throw "gC hash cP set fail cP=" + this.fY + "/" + ex;
            }
            this.eZ = function (rm, gJ) {
                var hI = null;
                try {
                    if (gJ === undefined) {
                        hI = uB.te(rm);
                    } else {
                        hI = uB.te(rm, gJ);
                    }
                } catch (ex) {
                    throw "eZ failed:" + ex;
                }
                if (hI.qP === true) {
                    this.eV = hI;
                    this.state = "SIGN";
                } else if (hI.qy === true) {
                    this.fI = hI;
                    this.state = "VERIFY";
                } else {
                    throw "eZ failed.:" + hI;
                }
            };
            this.jT = function (cE) {
                if (typeof cE['ecprvhex'] == 'string' && typeof cE['dU'] == 'string') {
                    this.ecprvhex = cE['ecprvhex'];
                    this.dU = cE['dU'];
                } else {
                    this.eV = cE;
                }
                this.state = "SIGN";
            };
            this.nG = function (cE) {
                if (typeof cE['ecpubhex'] == 'string' && typeof cE['dU'] == 'string') {
                    this.ecpubhex = cE['ecpubhex'];
                    this.dU = cE['dU'];
                } else if (cE instanceof Aostar.crypto.ef) {
                    this.fI = cE;
                } else if (cE instanceof tW) {
                    this.fI = cE;
                }
                this.state = "VERIFY";
            };
            this.qQ = function (nY) {
                var jF = new wM();
                jF.wB(nY);
                this.fI = jF.wh;
                this.state = "VERIFY";
            };
            this.fq = function (ee) {
                this.cq.fq(ee);
            };
            this.eW = function (cn) {
                this.cq.eW(cn);
            };
            this.gq = function () {
                if (this.dU != "sm2") {
                    this.ea = this.cq.gY();
                }
                if (typeof this.ecprvhex != "undefined" && typeof this.dU != "undefined") {
                    if (this.dU == "sm2") {
                        var fe = new Aostar.crypto.SM3withSM2({cT: this.dU});
                        var G = fe.ey['G'];
                        var Q = G.multiply(new O(this.ecprvhex, 16));
                        var eB = Q.fc().dK().eE(16) + Q.fu().dK().eE(16);
                        var eY = new al();
                        var z = new al().ob(G, eB);
                        var ku = eY.hO(eY.eg(z).toString());
                        var fL = AostarJS.el.fM.stringify(this.cq.cq.gx);
                        fL = AostarJS.el.fM.parse(fL).toString();
                        fL = eY.dS(fL);
                        var iR = new Array(eY.lJ());
                        eY.eT(ku, 0, ku.length);
                        eY.eT(fL, 0, fL.length);
                        eY.ip(iR, 0);
                        var fN = eY.eg(iR).toString();
                        this.ea = fN;
                        this.iu = fe.iY(this.ea, this.ecprvhex);
                    } else {
                        var fe = new Aostar.crypto.ef({'cT': this.dU});
                        this.iu = fe.iY(this.ea, this.ecprvhex);
                    }
                } else if (this.jb == "rsaandmgf1") {
                    this.iu = this.eV.wZ(this.ea, this.fY, this.nk);
                } else if (this.jb == "rsa") {
                    this.iu = this.eV.kC(this.ea, this.fY);
                } else if (this.eV instanceof Aostar.crypto.ef) {
                    this.iu = this.eV.kC(this.ea);
                } else if (this.eV instanceof Aostar.crypto.rz) {
                    this.iu = this.eV.kC(this.ea);
                } else {
                    throw "gn: unsupported public key cP: " + this.jb;
                }
                return this.iu;
            };
            this.sX = function (ee) {
                this.fq(ee);
                this.gq();
            };
            this.iY = function (cn) {
                this.eW(cn);
                this.gq();
            };
            this.iP = function (gV) {
                if (this.dU != "sm2") {
                    this.ea = this.cq.gY();
                }
                if (typeof this.ecpubhex != "undefined" && typeof this.dU != "undefined") {
                    if (this.dU == "sm2") {
                        var fe = new Aostar.crypto.SM3withSM2({cT: this.dU});
                        var G = fe.ey['G'];
                        var eB = this.ecpubhex.substr(2, 128);
                        var eY = new al();
                        var z = new al().ob(G, eB);
                        var ku = eY.hO(eY.eg(z).toString());
                        var fL = AostarJS.el.fM.stringify(this.cq.cq.gx);
                        fL = AostarJS.el.fM.parse(fL).toString();
                        fL = eY.dS(fL);
                        var iR = new Array(eY.lJ());
                        eY.eT(ku, 0, ku.length);
                        eY.eT(fL, 0, fL.length);
                        eY.ip(iR, 0);
                        var fN = eY.eg(iR).toString();
                        this.ea = fN;
                        return fe.kG(this.ea, gV, this.ecpubhex);
                    } else {
                        var fe = new Aostar.crypto.ef({cT: this.dU});
                        return fe.kG(this.ea, gV, this.ecpubhex);
                    }
                } else if (this.jb == "rsaandmgf1") {
                    return this.fI.wN(this.ea, gV, this.fY, this.nk);
                } else if (this.jb == "rsa") {
                    return this.fI.lc(this.ea, gV);
                } else if (this.fI instanceof Aostar.crypto.ef) {
                    return this.fI.lc(this.ea, gV);
                } else if (this.fI instanceof Aostar.crypto.rz) {
                    return this.fI.lc(this.ea, gV);
                } else {
                    throw "gn: unsupported public key cP: " + this.jb;
                }
            };
        }
    };
    this.eZ = function (key, gJ) {
        throw "eZ(key, gJ) not supported for this cP:dC=" + this.gE;
    };
    this.nG = function (wK) {
        throw "nG(rsaPubKeyy) not supported for this cP:dC=" + this.gE;
    };
    this.qQ = function (nY) {
        throw "qQ(nY) not supported for this cP:dC=" + this.gE;
    };
    this.jT = function (eV) {
        throw "jT(eV) not supported for this cP:dC=" + this.gE;
    };
    this.fq = function (ee) {
        throw "fq(ee) not supported for this cP:dC=" + this.gE;
    };
    this.eW = function (cn) {
        throw "eW(cn) not supported for this cP:dC=" + this.gE;
    };
    this.gq = function () {
        throw "gq() not supported for this cP:dC=" + this.gE;
    };
    this.sX = function (ee) {
        throw "gW(ee) not supported for this cP:dC=" + this.gE;
    };
    this.iY = function (cn) {
        throw "fS(cn) not supported for this cP:dC=" + this.gE;
    };
    this.iP = function (gV) {
        throw "iP(gV) not supported for this cP:dC=" + this.gE;
    };
    this.sT = cE;
    if (cE !== undefined) {
        if (cE['cP'] !== undefined) {
            this.ei = cE['cP'];
            if (cE['dC'] === undefined) {
                this.fC = Aostar.crypto.dV.ka[this.ei];
            } else {
                this.fC = cE['dC'];
            }
            this.gE = this.ei + ":" + this.fC;
            this.gC(this.ei, this.fC);
            this.ro();
        }
        if (cE['psssaltlen'] !== undefined) this.nk = cE['psssaltlen'];
        if (cE['prvkeypem'] !== undefined) {
            if (cE['prvkeypas'] !== undefined) {
                throw "both prvkeypem and prvkeypas parameters not supported";
            } else {
                try {
                    var eV = new tW();
                    eV.vY(cE['prvkeypem']);
                    this.jT(eV);
                } catch (ex) {
                    throw "fatal error to load pem private key: " + ex;
                }
            }
        }
    }
};
Aostar.crypto.ih = new function () {
    this.wQ = {
        '2a864886f70d010101': 'rsaEncryption',
        '2a8648ce3d0201': 'ecPublicKey',
        '2a8648ce380401': 'dsa',
        '2a8648ce3d030107': 'secp256r1',
        '2b8104001f': 'secp192k1',
        '2b81040021': 'secp224r1',
        '2b8104000a': 'secp256k1',
        '2b81040023': 'secp521r1',
        '2b81040022': 'secp384r1',
        '2a8648ce380403': 'SHA1withDSA',
        '608648016503040301': 'SHA224withDSA',
        '608648016503040302': 'SHA256withDSA'
    };
};
if (typeof Aostar == "undefined" || !Aostar) Aostar = {};
if (typeof Aostar.crypto == "undefined" || !Aostar.crypto) Aostar.crypto = {};
Aostar.crypto.es = new function () {
    var gM = {};
    var mr = {};

    function aH(cn) {
        return new O(cn, 16);
    };this.getByName = function (oq) {
        var name = oq;
        if (typeof mr[name] != "undefined") {
            name = mr[oq];
        }
        if (typeof gM[name] != "undefined") {
            return gM[name];
        }
        throw "unregistered EC cT name: " + name;
    };
    this.hC = function (name, hU, tK, uD, tS, vb, sc, rZ, sp, nV, hl, pY) {
        gM[name] = {};
        var p = aH(tK);
        var a = aH(uD);
        var b = aH(tS);
        var n = aH(vb);
        var h = aH(sc);
        var cT = new aG(p, a, b);
        var G = cT.ur("04" + rZ + sp);
        gM[name]['name'] = name;
        gM[name]['hU'] = hU;
        gM[name]['cT'] = cT;
        gM[name]['G'] = G;
        gM[name]['n'] = n;
        gM[name]['h'] = h;
        gM[name]['hl'] = hl;
        gM[name]['pY'] = pY;
        for (var i = 0; i < nV.length; i++) {
            mr[nV[i]] = name;
        }
    };
};
Aostar.crypto.es.hC("secp128r1", 128, "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC", "E87579C11079F43DD824993C2CEE5ED3", "FFFFFFFE0000000075A30D1B9038A115", "1", "161FF7528B899B2D0C28607CA52C5B86", "CF5AC8395BAFEB13C02DA292DDED7A83", [], "", "secp128r1 : SECG cT over a 128 bit prime field");
Aostar.crypto.es.hC("secp160k1", 160, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", "0", "7", "0100000000000000000001B8FA16DFAB9ACA16B6B3", "1", "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB", "938CF935318FDCED6BC28286531733C3F03C4FEE", [], "", "secp160k1 : SECG cT over a 160 bit prime field");
Aostar.crypto.es.hC("secp160r1", 160, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC", "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45", "0100000000000000000001F4C8F927AED3CA752257", "1", "4A96B5688EF573284664698968C38BB913CBFC82", "23A628553168947D59DCC912042351377AC5FB32", [], "", "secp160r1 : SECG cT over a 160 bit prime field");
Aostar.crypto.es.hC("secp192k1", 192, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37", "0", "3", "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", "1", "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D", "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D", []);
Aostar.crypto.es.hC("secp192r1", 192, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC", "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1", "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", "1", "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012", "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811", []);
Aostar.crypto.es.hC("secp224r1", 224, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", "1", "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", []);
Aostar.crypto.es.hC("secp256k1", 256, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", "0", "7", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", "1", "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", []);
Aostar.crypto.es.hC("secp256r1", 256, "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC", "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", "1", "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296", "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", ["NIST P-256", "P-256", "prime256v1"]);
Aostar.crypto.es.hC("secp384r1", 384, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC", "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", "1", "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7", "3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", ["NIST P-384", "P-384"]);
Aostar.crypto.es.hC("secp521r1", 521, "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC", "051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", "1", "C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66", "011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650", ["NIST P-521", "P-521"]);
Aostar.crypto.es.hC("sm2", 256, "FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF", "FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC", "28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93", "FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", "1", "32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7", "BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0", ["sm2", "SM2"]);

function aK(eO) {
    this.iB = 1;
    this.jC = null;
    this.lo = null;
    this.ii = null;
    this.key = new Array(32);
    this.ib = 0;
    if (typeof(eO) != 'undefined') {
        this.eO = eO;
    } else {
        this.eO = iJ.lT;
    }
};aK.prototype = {
    qO: function (h) {
        if ((h.length & 1) == 0) {
            return h;
        } else {
            return "0" + h;
        }
    }, wW: function (n) {
        if (n > 127 || n < -128) {
            var result = 0xff & n;
            if (result > 127) {
                result = 0x7f & n;
                result = 0x7f ^ result;
                return -(result + 1);
            }
            return result;
        } else {
            return n;
        }
    }, Reset: function () {
        this.lo = new al();
        this.ii = new al();
        var mv = this.hO(this.jC.fc().dK().eE(16));
        var lB = this.hO(this.jC.fu().dK().eE(16));
        this.ii.eT(mv, 0, mv.length);
        this.lo.eT(mv, 0, mv.length);
        this.lo.eT(lB, 0, lB.length);
        this.iB = 1;
        this.lQ();
    }, lQ: function () {
        var iF = new al(this.lo);
        iF.gd(this.iB >> 24 & 0xff);
        iF.gd(this.iB >> 16 & 0xff);
        iF.gd(this.iB >> 8 & 0xff);
        iF.gd(this.iB & 0xff);
        iF.ip(this.key, 0);
        this.ib = 0;
        this.iB++;
    }, kO: function (jW, ik) {
        var k = null;
        var ed = null;
        var fe = new Aostar.crypto.ef({"cT": "sm2"});
        var fX = (arguments.length === 1 ? this.py(fe) : ik);
        k = new O(fX.ecprvhex, 16);
        var eA = fX.ecpubhex;
        ed = V.kE(fe.ey['cT'], eA);
        this.jC = jW.multiply(k);
        this.Reset();
        return ed;
    }, py: function (fe) {
        var fX = fe.mT();
        if (this.rM(fX.ecpubhex)) {
            return fX;
        } else {
            return this.py(fe);
        }
    }, rM: function (ecpubhex) {
        var ht = ecpubhex.length - 2;
        var qH = ecpubhex.substr(2, 2);
        var pD = ecpubhex.substr(2 + ht / 2, 2);
        if (qH === '00' || pD === '00') {
            return false;
        } else {
            return true;
        }
    }, qc: function (data) {
        this.ii.eT(data, 0, data.length);
        for (var i = 0; i < data.length; i++) {
            if (this.ib == this.key.length) {
                this.lQ();
            }
            data[i] ^= this.key[this.ib++];
        }
    }, qs: function (lG, ed) {
        this.jC = ed.multiply(lG);
        this.Reset();
    }, qb: function (data) {
        for (var i = 0; i < data.length; i++) {
            if (this.ib == this.key.length) {
                this.lQ();
            }
            data[i] ^= this.key[this.ib++];
        }
        this.ii.eT(data, 0, data.length);
    }, ni: function (fJ) {
        var lB = this.hO(this.jC.fu().dK().eE(16));
        this.ii.eT(lB, 0, lB.length);
        this.ii.ip(fJ, 0);
        this.Reset();
    }, pA: function (fI, plaintext, ik) {
        var data = new Array(plaintext.length);
        Array.Copy(plaintext, 0, data, 0, plaintext.length);
        var ed = (arguments.length === 2 ? this.kO(fI) : this.kO(fI, ik));
        this.qc(data);
        var fJ = new Array(32);
        this.ni(fJ);
        var x = new Aostar.df.gv({jR: ed.fc().dK()});
        var y = new Aostar.df.gv({jR: ed.fu().dK()});
        var sM = new Aostar.df.kg({cn: this.eg(fJ).toString()});
        var sF = new Aostar.df.kg({cn: this.eg(data).toString()});
        var options = {array: [x, y, sM, sF]};
        var nQ = new Aostar.df.jA(options);
        return nQ.ew();
    }, wx: function (fI, plaintext, ik) {
        var data = new Array(plaintext.length);
        Array.Copy(plaintext, 0, data, 0, plaintext.length);
        var ed = (arguments.length === 2 ? this.kO(fI) : this.kO(fI, ik));
        this.qc(data);
        var fJ = new Array(32);
        this.ni(fJ);
        var hh;
        if (this.eO == iJ.lT) {
            hh = this.qO(ed.fc().dK().eE(16)) + this.qO(ed.fu().dK().eE(16)) + this.eg(fJ).toString() + this.eg(data).toString();
        } else if (this.eO == iJ.qt) {
            hh = ed.fc().dK().eE(16) + ed.fu().dK().eE(16) + this.eg(data).toString() + this.eg(fJ).toString();
        } else {
            throw new Error("[SM2:kM]invalid type eO(" + this.eO + ")");
        }
        return hh;
    }, dS: function (fd) {
        var da = [];
        var fZ = fd.length;
        for (var i = 0; i < fZ; i += 2) {
            da[da.length] = parseInt(fd.substr(i, 2), 16);
        }
        return da;
    }, hO: function (fd) {
        var da = [];
        if (fd.length < 64) {
            fd = this.jI(fd, 64);
        }
        if (fd.length > 64) {
            fd = fd.substr(fd.length - 64, fd.length);
        }
        var fZ = fd.length;
        for (var i = 0; i < fZ; i += 2) {
            da[da.length] = parseInt(fd.substr(i, 2), 16);
        }
        return da;
    }, jI: function (fd, length) {
        return new Array((length + 1) - fd.length).join("0") + fd;
    }, eg: function (gh) {
        var da = new Array(32);
        var j = 0;
        for (var i = 0; i < gh.length * 2; i += 2) {
            da[i >>> 3] |= parseInt(gh[j]) << (24 - (i % 8) * 4);
            j++;
        }
        var fB = new AostarJS.js.fE.eZ(da, gh.length);
        return fB;
    }, kM: function (mR, fk) {
        var hh = fk;
        var hW = hh.substr(0, 64);
        var kx = hh.substr(0 + hW.length, 64);
        var fJ = hh.substr(hW.length + kx.length, 64);
        var kf = hh.substr(hW.length + kx.length + 64);
        var data = this.dS(kf);
        var ed = this.ov(hW, kx);
        this.qs(mR, ed);
        this.qb(data);
        var kd = new Array(32);
        this.ni(kd);
        var nJ = this.eg(kd).toString() == fJ;
        if (nJ) {
            var fB = this.eg(data);
            var po = AostarJS.el.fM.stringify(fB);
            return po;
        } else {
            throw new Error("[SM2:kM] C3 is not match!");
            return '';
        }
    }, uf: function (mR, fk) {
        var hh = fk;
        var iX = cB.lp(hh);
        var hW = iX[0];
        var kx = iX[1];
        var fJ;
        switch (this.eO) {
            case iJ.lT:
                fJ = iX[2];
                kf = iX[3];
                break;
            case iJ.qt:
                kf = iX[2];
                fJ = iX[3];
                break;
            default:
                throw new Error("[SM2:kM]invalid type eO(" + this.eO + ")");
        }
        var data = this.dS(kf);
        var ed = this.ov(hW, kx);
        this.qs(mR, ed);
        this.qb(data);
        var kd = new Array(32);
        this.ni(kd);
        var nJ = this.eg(kd).toString() == fJ;
        if (nJ) {
            var fB = this.eg(data);
            var po = AostarJS.el.fM.stringify(fB);
            return po;
        } else {
            throw new Error("[SM2:kM] C3 is not match!");
            return '';
        }
    }, ov: function (x, y) {
        var fe = new Aostar.crypto.ef({"cT": "sm2"});
        if (x.length < 64) {
            x = this.jI(x, 64);
        } else {
            x = x.substr((x.length - 64), 64);
        }
        if (y.length < 64) {
            y = this.jI(y, 64);
        } else {
            y = y.substr((y.length - 64), 64);
        }
        var eA = '04' + x + y;
        var lZ = V.kE(fe.ey['cT'], eA);
        return lZ;
    }
};
window.iJ = {qt: 0, lT: 1};
if (typeof Aostar == "undefined" || !Aostar) Aostar = {};
if (typeof Aostar.crypto == "undefined" || !Aostar.crypto) Aostar.crypto = {};
Aostar.crypto.SM3withSM2 = function (cE) {
    var fG = "sm2";
    var ey = null;
    var eh = null;
    var eB = null;
    var lO = new bv();
    var uV = null;
    this.type = "SM2";

    function cz(P, k, Q, l) {
        var m = Math.max(k.fl(), l.fl());
        var Z = P.gg(Q);
        var R = P.cT.ho();
        for (var i = m - 1; i >= 0; --i) {
            R = R.oy();
            R.z = O.ONE;
            if (k.en(i)) {
                if (l.en(i)) {
                    R = R.gg(Z);
                } else {
                    R = R.gg(P);
                }
            } else {
                if (l.en(i)) {
                    R = R.gg(Q);
                }
            }
        }
        return R;
    };this.jk = function (iE) {
        return new O(iE.fl(), lO).cF(iE.fA(O.ONE)).add(O.ONE);
    };
    this.mX = function (fG) {
        this.ey = Aostar.crypto.es.getByName(fG);
        this.eh = null;
        this.eB = null;
        this.fG = fG;
    };
    this.iO = function (eh) {
        this.qP = true;
        this.eh = eh;
    };
    this.jq = function (eB) {
        this.qy = true;
        this.eB = eB;
    };
    this.mT = function () {
        var mF = this.ey['n'];
        var kN = this.jk(mF);
        var kq = this.ey['G'].multiply(kN);
        var mU = kq.fc().dK();
        var mq = kq.fu().dK();
        var gO = this.ey['hU'] / 4;
        var hQ = ("0000000000" + kN.toString(16)).slice(-gO);
        var nX = ("0000000000" + mU.toString(16)).slice(-gO);
        var pl = ("0000000000" + mq.toString(16)).slice(-gO);
        var iy = "04" + nX + pl;
        this.iO(hQ);
        this.jq(iy);
        return {'ecprvhex': hQ, 'ecpubhex': iy};
    };
    this.kC = function (fN) {
        return this.iY(fN, this.eh);
    };
    this.iY = function (fN, oG) {
        var d = new O(oG, 16);
        var n = this.ey['n'];
        var e = new O(fN, 16);
        var k = null;
        var pK = null;
        var r = null;
        var s = null;
        var lG = d;
        do {
            do {
                var fX = this.mT();
                k = new O(fX.ecprvhex, 16);
                var eA = fX.ecpubhex;
                pK = V.kE(this.ey['cT'], eA);
                r = e.add(pK.fc().dK());
                r = r.cF(n);
            } while (r.eS(O.ZERO) || r.add(k).eS(n));
            var oj = lG.add(O.ONE);
            oj = oj.hx(n);
            s = r.multiply(lG);
            s = k.fA(s).cF(n);
            s = oj.multiply(s).cF(n);
        } while (s.eS(O.ZERO));
        return Aostar.crypto.ef.nq(r, s);
    };
    this.gq = function (hash, nL) {
        var d = nL;
        var n = this.ey['n'];
        var e = O.gP(hash);
        do {
            var k = this.jk(n);
            var G = this.ey['G'];
            var Q = G.multiply(k);
            var r = Q.fc().dK().cF(n);
        } while (r.cS(O.ZERO) <= 0);
        var s = k.hx(n).multiply(e.add(d.multiply(r))).cF(n);
        return this.lD(r, s);
    };
    this.lc = function (fN, eR) {
        return this.kG(fN, eR, this.eB);
    };
    this.kG = function (fN, eR, eA) {
        var r, s;
        var eU = Aostar.crypto.ef.nK(eR);
        r = eU.r;
        s = eU.s;
        var Q;
        Q = V.kE(this.ey['cT'], eA);
        var e = new O(fN, 16);
        return this.jZ(e, r, s, Q);
    };
    this.iP = function (hash, dz, hf) {
        var r, s;
        if (mh.dV.isArray(dz)) {
            var eU = this.nu(dz);
            r = eU.r;
            s = eU.s;
        } else if ("object" === typeof dz && dz.r && dz.s) {
            r = dz.r;
            s = dz.s;
        } else {
            throw "Invalid value for signature";
        }
        var Q;
        if (hf instanceof V) {
            Q = hf;
        } else if (mh.dV.isArray(hf)) {
            Q = V.qB(this.ey['cT'], hf);
        } else {
            throw "Invalid format for hf value, must be byte array lu V";
        }
        var e = O.gP(hash);
        return this.jZ(e, r, s, Q);
    };
    this.jZ = function (e, r, s, Q) {
        var n = this.ey['n'];
        var G = this.ey['G'];
        var t = r.add(s).cF(n);
        if (t.eS(O.ZERO)) return false;
        var nb = G.multiply(s);
        nb = nb.add(Q.multiply(t));
        var R = e.add(nb.fc().dK()).cF(n);
        return r.eS(R);
    };
    this.lD = function (r, s) {
        var hd = r.lY();
        var gi = s.lY();
        var eC = [];
        eC.push(0x02);
        eC.push(hd.length);
        eC = eC.concat(hd);
        eC.push(0x02);
        eC.push(gi.length);
        eC = eC.concat(gi);
        eC.unshift(eC.length);
        eC.unshift(0x30);
        return eC;
    };
    this.nu = function (dz) {
        var cursor;
        if (dz[0] != 0x30) throw new Error("gn not a valid jA");
        cursor = 2;
        if (dz[cursor] != 0x02) throw new Error("First element in signature must be a gv");
        ;var hd = dz.slice(cursor + 2, cursor + 2 + dz[cursor + 1]);
        cursor += 2 + dz[cursor + 1];
        if (dz[cursor] != 0x02) throw new Error("Second element in signature must be a gv");
        var gi = dz.slice(cursor + 2, cursor + 2 + dz[cursor + 1]);
        cursor += 2 + dz[cursor + 1];
        var r = O.gP(hd);
        var s = O.gP(gi);
        return {r: r, s: s};
    };
    this.uz = function (dz) {
        if (dz.length !== 65) {
            throw "gn has the wrong length";
        }
        var i = dz[0] - 27;
        if (i < 0 || i > 7) {
            throw "Invalid signature type";
        }
        var n = this.ey['n'];
        var r = O.gP(dz.slice(1, 33)).cF(n);
        var s = O.gP(dz.slice(33, 65)).cF(n);
        return {r: r, s: s, i: i};
    };
    if (cE !== undefined) {
        if (cE['cT'] !== undefined) {
            this.fG = cE['cT'];
        }
    }
    if (this.fG === undefined) this.fG = fG;
    this.mX(this.fG);
    if (cE !== undefined) {
        if (cE['prv'] !== undefined) this.iO(cE['prv']);
        if (cE['pub'] !== undefined) this.jq(cE['pub']);
    }
};
(function () {
    var C = AostarJS;
    var fK = C.js;
    var fE = fK.fE;
    var gp = fK.gp;
    var lv = C.hk;
    var W = [];
    var jx = lv.jx = gp.extend({
        qg: function () {
            this.jH = new fE.eZ([0x7380166f, 0x4914b2b9, 0x172442d7, 0xda8a0600, 0xa96f30bc, 0x163138aa, 0xe38dee4d, 0xb0fb0e4e])
        }, qX: function (M, offset) {
            var H = this.jH.da;
            var a = H[0];
            var b = H[1];
            var c = H[2];
            var d = H[3];
            var e = H[4];
            for (var i = 0; i < 80; i++) {
                if (i < 16) {
                    W[i] = M[offset + i] | 0
                } else {
                    var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
                    W[i] = (n << 1) | (n >>> 31)
                }
                var t = ((a << 5) | (a >>> 27)) + e + W[i];
                if (i < 20) {
                    t += ((b & c) | (~b & d)) + 0x5a827999
                } else if (i < 40) {
                    t += (b ^ c ^ d) + 0x6ed9eba1
                } else if (i < 60) {
                    t += ((b & c) | (b & d) | (c & d)) - 0x70e44324
                } else {
                    t += (b ^ c ^ d) - 0x359d3e2a
                }
                e = d;
                d = c;
                c = (b << 30) | (b >>> 2);
                b = a;
                a = t
            }
            H[0] = (H[0] + a) | 0;
            H[1] = (H[1] + b) | 0;
            H[2] = (H[2] + c) | 0;
            H[3] = (H[3] + d) | 0;
            H[4] = (H[4] + e) | 0
        }, mE: function () {
            var data = this.gx;
            var jg = data.da;
            var oT = this.pN * 8;
            var kb = data.fg * 8;
            jg[kb >>> 5] |= 0x80 << (24 - kb % 32);
            jg[(((kb + 64) >>> 9) << 4) + 14] = Math.floor(oT / 0x100000000);
            jg[(((kb + 64) >>> 9) << 4) + 15] = oT;
            data.fg = jg.length * 4;
            this.ig();
            return this.jH
        }, clone: function () {
            var clone = gp.clone.call(this);
            clone.jH = this.jH.clone();
            return clone
        }
    });
    C.jx = gp.qa(jx);
    C.vT = gp.tU(jx)
}());

function al() {
    this.rI = 64;
    this.fo = new Array();
    this.hE = 0;
    this.ij = 0;
    this.pL = 32;
    this.nd = [1937774191, 1226093241, 388252375, -628488704, -1452330820, 372324522, -477237683, -1325724082];
    this.v = new Array(8);
    this.rS = new Array(8);
    this.jO = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
    this.X = new Array(68);
    this.hF = 0;
    this.tf = 0x79cc4519;
    this.pG = 0x7a879d8a;
    if (arguments.length > 0) {
        this.sv(arguments[0])
    } else {
        this.Init()
    }
};al.prototype = {
    Init: function () {
        this.fo = new Array(4);
        this.Reset()
    }, sv: function (t) {
        this.fo = new Array(t.fo.length);
        Array.Copy(t.fo, 0, this.fo, 0, t.fo.length);
        this.hE = t.hE;
        this.ij = t.ij;
        Array.Copy(t.X, 0, this.X, 0, t.X.length);
        this.hF = t.hF;
        Array.Copy(t.v, 0, this.v, 0, t.v.length)
    }, lJ: function () {
        return this.pL
    }, Reset: function () {
        this.ij = 0;
        this.hE = 0;
        Array.Clear(this.fo, 0, this.fo.length);
        Array.Copy(this.nd, 0, this.v, 0, this.nd.length);
        this.hF = 0;
        Array.Copy(this.jO, 0, this.X, 0, this.jO.length)
    }, wI: function () {
        return this.rI
    }, og: function () {
        var i;
        var gl = this.X;
        var oV = new Array(64);
        for (i = 16; i < 68; i++) {
            gl[i] = this.uE(gl[i - 16] ^ gl[i - 9] ^ (T(gl[i - 3], 15))) ^ (T(gl[i - 13], 7)) ^ gl[i - 6]
        }
        for (i = 0; i < 64; i++) {
            oV[i] = gl[i] ^ gl[i + 4]
        }
        var ek = this.v;
        var dJ = this.rS;
        Array.Copy(ek, 0, dJ, 0, this.nd.length);
        var gL, jL, kY, kL, ir;
        for (i = 0; i < 16; i++) {
            ir = T(dJ[0], 12);
            gL = ir + dJ[4] + T(this.tf, i);
            gL = T(gL, 7);
            jL = gL ^ ir;
            kY = this.rE(dJ[0], dJ[1], dJ[2]) + dJ[3] + jL + oV[i];
            kL = this.rG(dJ[4], dJ[5], dJ[6]) + dJ[7] + gL + gl[i];
            dJ[3] = dJ[2];
            dJ[2] = T(dJ[1], 9);
            dJ[1] = dJ[0];
            dJ[0] = kY;
            dJ[7] = dJ[6];
            dJ[6] = T(dJ[5], 19);
            dJ[5] = dJ[4];
            dJ[4] = this.oe(kL)
        }
        for (i = 16; i < 64; i++) {
            ir = T(dJ[0], 12);
            gL = ir + dJ[4] + T(this.pG, i);
            gL = T(gL, 7);
            jL = gL ^ ir;
            kY = this.tE(dJ[0], dJ[1], dJ[2]) + dJ[3] + jL + oV[i];
            kL = this.sV(dJ[4], dJ[5], dJ[6]) + dJ[7] + gL + gl[i];
            dJ[3] = dJ[2];
            dJ[2] = T(dJ[1], 9);
            dJ[1] = dJ[0];
            dJ[0] = kY;
            dJ[7] = dJ[6];
            dJ[6] = T(dJ[5], 19);
            dJ[5] = dJ[4];
            dJ[4] = this.oe(kL)
        }
        for (i = 0; i < 8; i++) {
            ek[i] ^= (dJ[i])
        }
        this.hF = 0;
        Array.Copy(this.jO, 0, this.X, 0, this.jO.length)
    }, nU: function (kB, hy) {
        var n = kB[hy] << 24;
        n |= (kB[++hy] & 0xff) << 16;
        n |= (kB[++hy] & 0xff) << 8;
        n |= (kB[++hy] & 0xff);
        this.X[this.hF] = n;
        if (++this.hF == 16) {
            this.og()
        }
    }, tY: function (fl) {
        if (this.hF > 14) {
            this.og()
        }
        this.X[14] = (this.rY(fl, 32));
        this.X[15] = (fl & (0xffffffff))
    }, uS: function (n, eN, off) {
        eN[off] = (n >>> 24 & 0xFF);
        eN[++off] = (n >>> 16 & 0xFF);
        eN[++off] = (n >>> 8 & 0xFF);
        eN[++off] = (n & 0xFF);
    }, ip: function (vf, uy) {
        this.ub();
        for (var i = 0; i < 8; i++) {
            this.uS(this.v[i], vf, uy + i * 4)
        }
        this.Reset();
        return this.pL
    }, gd: function (input) {
        this.fo[this.hE++] = input;
        if (this.hE == this.fo.length) {
            this.nU(this.fo, 0);
            this.hE = 0
        }
        this.ij++
    }, eT: function (input, hy, length) {
        while ((this.hE != 0) && (length > 0)) {
            this.gd(input[hy]);
            hy++;
            length--
        }
        while (length > this.fo.length) {
            this.nU(input, hy);
            hy += this.fo.length;
            length -= this.fo.length;
            this.ij += this.fo.length
        }
        while (length > 0) {
            this.gd(input[hy]);
            hy++;
            length--
        }
    }, ub: function () {
        var fl = (this.ij << 3);
        this.gd((128));
        while (this.hE != 0) this.gd((0));
        this.tY(fl);
        this.og()
    }, ROTATE: function (x, n) {
        return (x << n) | (this.sI(x, (32 - n)))
    }, oe: function (X) {
        return ((X) ^ T((X), 9) ^ T((X), 17))
    }, uE: function (X) {
        return ((X) ^ T((X), 15) ^ T((X), 23))
    }, rE: function (X, Y, Z) {
        return (X ^ Y ^ Z)
    }, tE: function (X, Y, Z) {
        return ((X & Y) | (X & Z) | (Y & Z))
    }, rG: function (X, Y, Z) {
        return (X ^ Y ^ Z)
    }, sV: function (X, Y, Z) {
        return ((X & Y) | (~X & Z))
    }, sI: function (number, gR) {
        console.error(number);
        if (number > qj.qu || number < qj.rg) {
            console.error(number);
            number = dO(number);
        }
        if (number >= 0) {
            return number >> gR
        } else {
            return (number >> gR) + (2 << ~gR)
        }
    }, rY: function (number, gR) {
        var kS;
        var big = new O();
        big.hH(number);
        if (big.eP() >= 0) {
            kS = big.lb(gR).gD()
        } else {
            var qT = new O();
            qT.hH(2);
            var oc = ~gR;
            var im = '';
            if (oc < 0) {
                var ru = 64 + oc;
                for (var i = 0; i < ru; i++) {
                    im += '0'
                }
                var ri = new O();
                ri.hH(number >> gR);
                var qY = new O("10" + im, 2);
                im = qY.eE(10);
                var r = qY.add(ri);
                kS = r.eE(10)
            } else {
                im = qT.shiftLeft((~gR)).gD();
                kS = (number >> gR) + im
            }
        }
        return kS
    }, ob: function (g, eB) {
        var pw = AostarJS.el.fM.parse("1234567812345678");
        var eI = pw.da.length * 4 * 8;
        this.gd((eI >> 8 & 0x00ff));
        this.gd((eI & 0x00ff));
        var qv = this.dS(pw.toString());
        this.eT(qv, 0, qv.length);
        var nF = this.dS(g.cT.a.dK().eE(16));
        var qz = this.dS(g.cT.b.dK().eE(16));
        var nI = this.dS(g.fc().dK().eE(16));
        var oS = this.dS(g.fu().dK().eE(16));
        var oA = this.dS(eB.substr(0, 64));
        var om = this.dS(eB.substr(64, 64));
        this.eT(nF, 0, nF.length);
        this.eT(qz, 0, qz.length);
        this.eT(nI, 0, nI.length);
        this.eT(oS, 0, oS.length);
        this.eT(oA, 0, oA.length);
        this.eT(om, 0, om.length);
        var cq = new Array(this.lJ());
        this.ip(cq, 0);
        return cq
    }, dS: function (fd) {
        var da = [];
        var fZ = fd.length;
        for (var i = 0; i < fZ; i += 2) {
            da[da.length] = parseInt(fd.substr(i, 2), 16)
        }
        return da
    }, hO: function (fd) {
        var da = [];
        if (fd.length < 64) {
            fd = this.jI(fd, 64);
        }
        if (fd.length > 64) {
            fd = fd.substr(fd.length - 64, fd.length);
        }
        var fZ = fd.length;
        for (var i = 0; i < fZ; i += 2) {
            da[da.length] = parseInt(fd.substr(i, 2), 16);
        }
        return da;
    }, jI: function (fd, length) {
        return new Array((length + 1) - fd.length).join("0") + fd;
    }, eg: function (gh) {
        var da = [];
        var j = 0;
        for (var i = 0; i < gh.length * 2; i += 2) {
            da[i >>> 3] |= parseInt(gh[j]) << (24 - (i % 8) * 4);
            j++
        }
        var fB = new AostarJS.js.fE.eZ(da, gh.length);
        return fB
    }
};
Array.Clear = function (mz, mb, length) {
    for (sr in mz) {
        mz[sr] = null
    }
};
Array.Copy = function (sH, sourceIndex, mz, mb, length) {
    var pQ = sH.slice(sourceIndex, sourceIndex + length);
    for (var i = 0; i < pQ.length; i++) {
        mz[mb] = pQ[i];
        mb++
    }
};

function T(n, distance) {
    return (n << distance) | (n >>> -distance);
};window.qj = {
    rg: -parseInt('10000000000000000000000000000000', 2),
    qu: parseInt('1111111111111111111111111111111', 2),
    parse: function (n) {
        if (n < this.rg) {
            var lU = new Number(-n);
            var kZ = lU.toString(2);
            var il = kZ.substr(kZ.length - 31, 31);
            var kP = '';
            for (var i = 0; i < il.length; i++) {
                var nx = il.substr(i, 1);
                kP += nx == '0' ? '1' : '0'
            }
            var result = parseInt(kP, 2);
            return (result + 1)
        } else if (n > this.qu) {
            var lU = Number(n);
            var kZ = lU.toString(2);
            var il = kZ.substr(kZ.length - 31, 31);
            var kP = '';
            for (var i = 0; i < il.length; i++) {
                var nx = il.substr(i, 1);
                kP += nx == '0' ? '1' : '0'
            }
            var result = parseInt(kP, 2);
            return -(result + 1)
        } else {
            return n
        }
    },
    vw: function (n) {
        if (n > 255) {
            var result = 0xff & n;
            return result;
        }
        if (n < -256) {
            var result = 0xff & n;
            result = 0xff ^ result;
            return (result + 1);
        } else {
            return n
        }
    }
};

function dO(n) {
    if (n > 2147483647 || n < -2147483648) {
        var result = 0xffffffff & n;
        if (result > 2147483647) {
            result = 0x7fffffff & n;
            result = 0x7fffffff ^ result;
            return -(result + 1);
        }
        return result;
    } else {
        return n
    }
};

function doSm3HashAndSm2EncryptRP(vJ, oi, split) {
    var pU = (arguments.length === 2 ? "|" : split);
    var su = doSM3Hash(oi) + pU + doRandomWord(8) + pU + oi;
    var rd = doEncrypt(su, vJ, 1);
    return rd;
};

function doEncrypt(data, eA, eO, ik) {
    var eF = new aK(eO == 0 ? eO : 1);
    var pO = eF.dS(AostarJS.el.fM.parse(data).toString());
    if (eA.length > 64 * 2) {
        eA = eA.substr(eA.length - 64 * 2);
    }
    var kk = eA.substr(0, 64);
    var kA = eA.substr(64);
    var jW = eF.ov(kk, kA);
    var mD = (arguments.length === 3 ? eF.pA(jW, pO) : eF.pA(jW, pO, ik));
    return mD;
};

function doDecrypt(mD, tp, eO) {
    var eF = new aK(eO == 0 ? eO : 1);
    var uk = new O(tp, 16);
    var plainText = eF.uf(uk, mD);
    return plainText;
};

function doSign(eh, data) {
    var dz = new Aostar.crypto.gn({"cP": "SM3withSM2", "dC": "cryptojs/jsrsa"});
    dz.jT({'ecprvhex': eh, 'dU': "sm2"});
    dz.fq(data);
    var rs = dz.gq();
    return rs;
};

function doVerify(eB, data, ss) {
    var dz = new Aostar.crypto.gn({"cP": "SM3withSM2", "dC": "cryptojs/jsrsa"});
    dz.nG({'ecpubhex': eB, 'dU': "sm2"});
    dz.fq(data);
    return dz.iP(ss);
};

function doSM3Hash(data) {
    var kI = new al();
    var od = AostarJS.el.fM.parse(data);
    var qV = kI.dS(od.toString());
    kI.eT(qV, 0, qV.length);
    var fJ = new Array(32);
    kI.ip(fJ, 0);
    var fN = kI.eg(fJ).toString();
    return fN.toUpperCase();
};

function doRandomWord(eI) {
    var ee = "";
    var gh = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_'];
    for (var i = 0; i < eI; i++) {
        pos = Math.round(AostarJS.el.gy.jz() * (gh.length - 1));
        ee += gh[pos];
    }
    return ee;
};

function v_ltd() {
    var word = new AostarJS.js.fE.eZ([-442786843, -1214389064, -1377332043, -443502618, -1735465320, -1612398687, -427708442, -1971263844, -1343841143, -375811867, -2052266609, -1207959552]);
    var text = word.toString(AostarJS.el.fM);
    return text;
}